#help-development

1 messages · Page 2120 of 1

torpid copper
golden kelp
#

```xml
U can also paste it in this thing (just copy paste this msg)

```

noble lantern
#

yeah dawg your build config a little screwy

torpid copper
#

test

visual tide
#

replace the single file declaration with the whole folder

delicate lynx
#

just use

<resources>
    <resource>
        <directory>src/main/resources</directory>
        <filtering>true</filtering>
    </resource>
</resources>
visual tide
#
<resources>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>true</filtering>
            </resource>
        </resources>

delicate lynx
#

what happned formatting

noble lantern
#
        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>true</filtering>
            </resource>
        </resources>
``` try using this for your resources instead of what you currently have

Also you may want a maven plugin like maven-compiler-plugin
#

LMAO

visual tide
#

LOL

delicate lynx
#

dawg did we all 3 copy the same thing

torpid copper
#

it must be good advice

visual tide
#
<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-compiler-plugin</artifactId>
    <version>3.8.1</version>
    <configuration>
        <source>${java.version}</source>
        <target>${java.version}</target>
    </configuration>
</plugin>

for maven-compiler-plugin

noble lantern
#

your formatting fucks up so bad

#

why

#

on the first line everytime xD

visual tide
#

dinscord

delicate lynx
#

that copies all contents in your resource folder into the root of the jar, useful for copying configs, etc

visual tide
#

there you go sir

#

neatly formatted

noble lantern
#

ahh i can read it now

#

maven be like

visual tide
#

jesus christ

#

someone teach this man about if (!condition) return;

delicate lynx
#

php 😐

visual tide
#

a mess 😐

noble lantern
#

me when php

visual tide
#

understanadble

granite beacon
#

I'm getting a ConcurrentModificationException when editing a custom mob inside one of their goals, is there a way I should go about doing so?

noble lantern
#

good old CME

#

you cant modify Lists in a loop (remove)

#

have to use theyre Iterator

torpid copper
#

what where do i use that plugin? in the pom?

noble lantern
granite beacon
compact haven
#

which is inside the <build> section

noble lantern
#

i have a decent way of handling this in one of my projects

granite beacon
#

Perfect, thanks

fierce spear
#

Now I get
Cannot resolve method 'getDataWatcher' in 'ArmorStand'

#

is there anything I could do about this, maybe convert armor stand to entityarmor stand?

torpid copper
#

Unrecongized tag: 'plugin'

#

in the build

#

should i jsut use intellij it has a plugin so i dont have to worry about this build right

delicate lynx
#

paste your pom

torpid copper
#

sorry im new

#
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>dev.cibmc.spigot.pluginbaby</groupId>
  <artifactId>pluginbaby</artifactId>
  <version>1.0-SNAPSHOT</version>
  <packaging>jar</packaging>
  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <maven.compiler.source>1.8</maven.compiler.source>
    <maven.compiler.target>1.8</maven.compiler.target>
  </properties>
  <repositories>
      <repository>
          <id>spigot-repo</id>
          <url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
      </repository>
  </repositories>
  <dependencies>
      <dependency>
            <groupId>org.spigotmc</groupId>
            <artifactId>spigot-api</artifactId>
            <version>1.17-R0.1-SNAPSHOT</version>
            <scope>provided</scope>
      </dependency>
  </dependencies>
  <build>
    <sourceDirectory>${project.basedir}/src/main/java</sourceDirectory>
    <resources>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>true</filtering>
            </resource>
        </resources>
        <plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-compiler-plugin</artifactId>
    <version>3.8.1</version>
    <configuration>
        <source>${java.version}</source>
        <target>${java.version}</target>
    </configuration>
</plugin>
  </build>
</project>```
delicate lynx
#

make a <plugins> section and move the plugin under there

#

so it's like

torpid copper
#

its working

#

😯

delicate lynx
#

awesome

noble lantern
#

ew

#

?paste

undone axleBOT
noble lantern
torpid copper
#

Execution default-testCompile of goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:testCompile failed: multiple points

#

is that the wrong addees?

noble lantern
noble lantern
fierce spear
#

to be honest I have no idea

#
DataWatcher watcher = ((EntityArmorStand) stand).getDataWatcher();
PacketPlayOutEntityMetadata data = new PacketPlayOutEntityMetadata(stand.getEntityId(), watcher, false);
((CraftPlayer)p).getHandle().b.a(data);
#

this is the code I'm trying to update

delicate lynx
#

formatted and organized it

granite beacon
#

I'm not sure when I can do that as its in the tick method of the goal

noble lantern
noble lantern
fierce spear
#

its a plugin that already exists but its from 1.16 i think

#

so I'm updating it to 1.18

granite beacon
noble lantern
#

well without knowing what DataWatch does or that packet does its hard totell exactly the end goal

granite beacon
# granite beacon What throws the error is the two lines with comments

These are the mods (look ugly but they're temporary)

    public void holdBomb(boolean bomb) {
        if (bomb) {
            ((org.bukkit.entity.Skeleton) this.getBukkitEntity()).getEquipment().setItemInMainHand(new ItemStack(Material.TNT));
        } else {
            ((org.bukkit.entity.Skeleton) this.getBukkitEntity()).getEquipment().setItemInMainHand(new ItemStack(Material.TNT, 0));
        }
    }

    public boolean isHoldingBomb() {
        return ((org.bukkit.entity.Skeleton) this.getBukkitEntity()).getEquipment().getItemInMainHand().getType() == Material.TNT;
    }
noble lantern
granite beacon
noble lantern
#

?paste

undone axleBOT
noble lantern
#

i dont see your error path in there

#

and none of it is what your doing

#

thats something with entity stepping

#

not setting item in main hand

granite beacon
#

Not sure at this point

granite beacon
# noble lantern weird

I fixed up the methods but still, it's throwing the same error.

    public void holdBomb(boolean bomb) {
        this.setItemSlot(EquipmentSlot.MAINHAND, !bomb ? ItemStack.EMPTY : new ItemStack(Items.TNT));
    }

    public boolean isHoldingBomb() {
        return this.getItemInHand(InteractionHand.MAIN_HAND) != ItemStack.EMPTY;
    }
#

It also only seems to occur when you remove the item rather than when adding it?

torpid copper
#

where can i see all the bucket events

granite beacon
granite beacon
#

Go to the spigot docs and then look under events

torpid copper
#

thx habibi

smoky oak
#

does double > int*int fail if int is bigger than sqrt(Integer.MAX_VALUE) ?

#

i want to not have to call sqrt on double since its so slow

brittle lily
#

How Can I Prevent Creeper from Exploding? I mean not Explosion Damage Just Creeper wont explode

smoky oak
#

theres a event when the creeper decides to explode i think

chrome beacon
#

A double is larger than an int if that's what you're asking

brittle lily
chrome beacon
#

Because you're undoing that sqrt

smoky oak
brittle lily
#

Thank you 🙂

smoky oak
#

im fairy sure 30mil² is bigger than Int.MAX_VALUE and im unsure if the check will still be computed correctly

#

@chrome beacon

chrome beacon
#

Ah yeah I see

#

I'm not sure

#

It will probably overflow but do test it

smoky oak
#

are you kidding me...

#

S'CUSE ME??

chrome beacon
#

double not Double

smoky oak
#

ah

chrome beacon
#

Also why not use long if you don't want decimals

ebon coral
#

Does anyone know how to use the Tebex API?

smoky oak
#

i dont i just want the check correctly

ebon coral
#

Attempting to generate a gift card and it isn't working whatsoever.

smoky oak
#

so now i just do

#

double > int * ((double) int)

ebon coral
#

final HttpRequest createHttpRequest = HttpRequest.newBuilder().header("X-Tebex-Secret", "token").uri(URI.create("https://plugin.tebex.io/gift-cards")).POST(HttpRequest.BodyPublishers.ofString("{\"amount\":" + value + "\"}")).build();

smoky oak
#

which forces both sides to be computed as double

#

im using double because its vector math

#

are you saying double > int * ((long) int) would be better?

brittle lily
#

Oh I wanna set Creeper. Creeper Will Explode but wont die just explode

#

How Can I set this

crimson terrace
#

have you tried cancelling the Death event?

#

nvm cant

brittle lily
#

But If I do it Creeper will never die, right?

crimson terrace
#

cant cancel the death event anyway. I solved that exact problem by just respawning the creeper inside the Explode event

#

and of course setting its health and attributes to the ones the creeper which just exploded had

brittle lily
#

hmmm

crimson terrace
#

I gave it more changes but thats basically what you have to do i think

brittle lily
#

But There is a should be easier way

crimson terrace
#

you can do it in the entity death event i believe

#

but I don't think there is an easier way

brittle lily
#

Okay Thank You For Help 🙂

mellow edge
#

Hello! is eazy to make costum GUIs (like bw shop or ah) without libraries

#

?

shell linden
#

How to use InventoryMoveItemEvent to prevent the player from moving items to any container?

next fossil
#

So I switched my NMS from 1.18 to 1.18.2 and the new NMS for 1.18.2 is now changed back to the pre-mojang-mapped style. And when I change it to that, it gives me compilation errors:
[18,43] cannot find symbol
[ERROR] symbol: class PacketPlayOutSpawnEntity
[ERROR] location: package net.minecraft.network.protocol.game

Help, Please!!

dark arrow
#

Is there any way to get location of a block on which player is standing

#

and also the direction at which player is looking

quaint mantle
#

Get the players location and just subtract 1 Y

dark arrow
#

ok

kindred valley
#

?paste

undone axleBOT
grim ice
#

i would get the bottom block relative of the player location

supple elk
#

What happens if you try and do things with a world which has been unloaded or deleted?

celest nacelle
#

How would I stop endermen getitng angry at endermites?

rough drift
#

@noble lantern Should be like this right?

grim ice
#

Yes

#

but you need a {} dont you

#

since its multiple lines of code

#

or does it count since all of them are under each other

rough drift
#

yep

#

the for counts the if

#

and the if counts the register

coral oyster
#

Hi I'm trying to make a plugin that manages minigames. My problem is that I want a command that writes a list of worlds to config.yml inputted when a player executes the command /minigames add <lobby/arena> <minigameName> <worlds> but when I run that command I get this error in console:

Cannot store to object array because "this.worldNames" is null

here is my code: https://paste.md-5.net/melarifoce.java

quaint mantle
#

anyone know what this.setGoalTarget in NMS is in 1.18.2

rough drift
mellow edge
#

why can't I put ```xml
<relocations>
<relocation>
<pattern>com.github.stefvanschie.inventoryframework</pattern>
<shadedPattern>[YOUR PACKAGE].inventoryframework</shadedPattern>
</relocation>
</relocations>

#

to a maven-jar-plugin

blissful pumice
noble lantern
noble lantern
rough drift
#

Help with reflection

noble lantern
#

Everything in my api registers dynamically

rough drift
#

nice

coral oyster
blissful pumice
crude loom
#

How can I loop through the server's files?

quaint mantle
#
        at java.lang.ClassLoader.defineClass1(Native Method) ~[?:?]
        at java.lang.ClassLoader.defineClass(ClassLoader.java:1012) ~[?:?]
        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:150) ~[?:?]
        at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:197) ~[paper-api-1.18.2-R0.1-SNAPSHOT.jar:?]```
#

does anyone know why my NMS isnt having fun when i try and spawn a custom enttiy

dark arrow
#

how can i get the direction the player is looking at

eternal night
#

Did you reobfuscate your plugin ?

sterile grotto
supple elk
dark arrow
#

ok

coral oyster
#

how can I use log colours in getLogger().info()?

eternal night
#

I am guessing you are using paper ?

blissful pumice
coral oyster
blissful pumice
#

Np

coral oyster
#

are there any colour codes i have to use or is it just common colour names

blissful pumice
#

Its just names

#

So ChatColor.RED

coral oyster
#

ok thanks

round finch
#

i'm the person who is dumb here?

#

i'm working on MCP Modding

#

this person wants me to loop though everything

wet breach
#

?jd

wet breach
dark arrow
#

how can i set a block in a given location

noble lantern
dark arrow
#

ok

noble lantern
#

if that block your placing has data

dark arrow
#

thanks

noble lantern
#

youll have to copy over the BlockData too

dark arrow
#

i just want to set the block in fron of player in fire

wet breach
#

depending on which location you are getting

coral oyster
wet breach
#

might have to adjust the y value of the location first

#

to get the appropriate spot

wet breach
crude loom
eternal night
#

what specific server files

blissful pumice
#

A is null

dark arrow
#

can i create a location variable with my own positions?

blissful pumice
blissful pumice
#

np

golden kelp
#

hello, i am using AsyncPlayerChatEvent to replace censored words, will this cause issues with other plugins?

compact haven
#

🤷‍♂️ probably not

dark arrow
#
if(player.getInventory().getItemInMainHand().getType().equals(Material.STICK)&&!block.getType().equals(Material.AIR)&&!block.getType().equals(Material.WATER)&&!block.getType().equals(Material.LAVA)){
            block.setType(Material.DIAMOND_BLOCK,true);
            for(int i =0;i<=5;i++){
                Location player_block_frontX = new Location(player.getWorld(), player_blockX + i, player_blockY, player_blockZ);
                player_block_frontX.getBlock().setType(Material.FIRE);
                Location player_block_frontZ = new Location(player.getWorld(), player_blockX, player_blockY, player_blockZ + i);
                player_block_frontZ.getBlock().setType(Material.FIRE);
                Location player_block_backX = new Location(player.getWorld(), player_blockX - i, player_blockY, player_blockZ);
                player_block_backX.getBlock().setType(Material.FIRE);
                Location player_block_backZ = new Location(player.getWorld(), player_blockX, player_blockY, player_blockZ - i);
                player_block_backZ.getBlock().setType(Material.FIRE);
            }```
with the help of this code i am able to summon fire in fron of player by 5 blocks but it summons it in a cross form and is there any way to summon fire in a spherical form?
compact haven
#

Do it at a low level, don’t do it at monitor or else it’ll fuck with logging plugins

dark arrow
#

?

grim ice
#

fix the spacing

#

and naming conventions

kindred valley
#

what was the name of sharpness ench

dark arrow
#

DAMAGE_ALL

kindred valley
#

what was the name of looting

dark arrow
#

let me check

#

LOOT_BONUS_MOBS

rough drift
#

How can you get old and new item in inventory click event?

#

I always get confused with it

chrome beacon
#

ItemStack

getCurrentItem()

Gets the ItemStack currently in the clicked slot.

ItemStack

getCursor()

Gets the current ItemStack on the cursor.

#

Copied from Javadoc

rough drift
#

Yes, but sometimes it does not work like that

#

for ex, if I put an item in an empty slot, getCurrentItem() sometimes returns null

#

or air

#

but if I use getCursor it returns the correct item

#

but not always

chrome beacon
chrome beacon
prime kraken
#

Hello, I have one question, I try to make a grenade, it's work fine but I have problems with particles. Actually my particles go over the map, it's a very big explosion, and I want to know if you know if it exist a methods or someting about the particles ?

#

To manage the tall...

pliant oyster
#

Like resize it?

#

if ur using an explosion particle u can just change the float to something smaller or bigger

prime kraken
# pliant oyster wdym?

I don't understand your expression i'm french (and i know it's bad sry.. xD), Yes it's an explosion and you have particles who makes the smoke, but the particles spawn like a shit

#

Oh i know wdym means what do you means Oo

#

I can paste a screenshot if you want

#

Like i want to resize and just put more particles in one place

golden kelp
#

Hey i am using AsyncPlayerChatEvent to replace the player's msg but its not working the way its supposed to be

#
@EventHandler(priority = EventPriority.HIGH)
    public void onMessage(AsyncPlayerChatEvent e) {
        String[] wordsToReplace = SimpleReplacer.replacements.keySet().toArray(new String[0]);
        for (String word : wordsToReplace) {
            if (e.getMessage().contains(word))
                e.setMessage(e.getMessage().replace(word, SimpleReplacer.replacements.get(word)));
        }
    }

My code ^

pliant oyster
prime kraken
pliant oyster
#

is there any words in there

#

oh wait

#

nvm

golden kelp
#

Yea there are

golden kelp
#

its just replacing censored words

pliant oyster
#

but u said it isnt working the way it's supposed to

#

what is it doing

golden kelp
#

It is not replacing the words

#

nvm fixed the issue, reloading the config wasnt reloading the hashmap

wide coyote
#

also you dont need to check if the message contains the word, just use replace

prime kraken
#

Hello, do you know if it's possible to set my item into many slot without using another inv.setItem(blablabla..), just had one line code ?

crude loom
#

You could use a for loop and inv.addItem(Item item);

prime kraken
#

10 is the slot

#

after you have the method with the material, the name, the number and the lore

crude loom
#

Do you want to add the same item for multiple slots?

prime kraken
#

Yes

crude loom
#

So you could do this:

for(int i=0;i<3;i++){
inv.addItem(getItem(Material.BLUE_CONCRETE, "Test", 1, Collections.singletonList("Test Lore")));
}```
#

This will add an item for the first 3 available slots

prime kraken
#

Ok nice i can try that, and if for exemple i want to add the same item for specifics slots ? It's possible ?

kindred valley
#

how could we add some sound effects to a player

crude loom
#

You could make a list of the specific slots and then iterate through that list, for example:

List<Integer> lstSlots = Arrays.asList(3,6,7);
for(int i=0; i<lstSlots.size();i++){
inv.setItem(lstSlots.get(i), getItem(Material.BLUE_CONCRETE, "Test", 1, Collections.singletonList("Test Lore")));
}
prime kraken
crude loom
#

Haha, happy to help 😁

kindred valley
#

?javadoc

harsh totem
#

I have this code:


import com.ytg667.myplugin.events.TutorialEvents;
import org.bukkit.ChatColor;
import org.bukkit.plugin.java.JavaPlugin;

public final class MyPlugin extends JavaPlugin {

    @Override
    public void onEnable() {
        // Plugin startup logic
        getServer().getPluginManager().registerEvent(new TutorialEvents(), this);
        getServer().getConsoleSender().sendMessage(ChatColor.GREEN + "[MyPlugin]: plugin is enabled!");
    }

    @Override
    public void onDisable() {
        // Plugin shutdown logic
        getServer().getConsoleSender().sendMessage(ChatColor.RED + "[MyPlugin]: plugin is disabled!");
    }
}```
And im getting this error: `Cannot resolve method 'registerEvent(TutorialEvents, MyPlugin)'`
#

What is wrong here?

#

the name of the event class file is TutorialEvents

crude loom
#

Could you send the TutorialEvents class?

delicate lynx
#

registerEvents

eternal night
#

^

harsh totem
# crude loom Could you send the TutorialEvents class?

import org.bukkit.ChatColor;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerJoinEvent;

public class TutorialEvents implements Listener {

    @EventHandler
    public static void OnPlayerJoin(PlayerJoinEvent event) {
        Player player = event.getPlayer();
        player.sendMessage(ChatColor.YELLOW + "Welcome to the server!");
    }
}
delicate lynx
#

make it plural

harsh totem
#

wdym

kindred valley
#

hello i need to use bukkitrunnable for delaying a command, right?

eternal night
#

Wrong method name

delicate lynx
#

change registerEvent to registerEvents

crude loom
harsh totem
#

thank you

kindred valley
#

which method

crude loom
#

You would want to use getServer().getScheduler().scheduleSyncDelayedTask()

mellow edge
#

how can I know if the player picked up specific item, e.g. you have 2 diamonds, how can you know that he picked up the 1. one?

#

ty for any help

crude loom
#

You can use the InventoryPickupItemEvent to detect item pickup and count the amount of diamonds he has picked up

kindred valley
mellow edge
#

I am working on diamond gen. for bedwars, when it reaches 5 diamonds, I want to block it until the player colletcs them

golden kelp
crude loom
crude loom
mellow edge
#

for now I have that, something similar

#

but what if the player would drop diamonds and other player would collect them, then the generators would suddently work again

#

hope that that makes sense

#

how can I calc the distance between the drop pos and player pos

#

and then check it

crude loom
#

Why would that be a problem, you want the generator to keep working after a player picks them up, no?

mellow edge
#

I want the generator to work only when the player picks the diamonds directly from it, and when it is full, it stops again

#

and I want to only resume generator if player picks items directly

crude loom
#

Oh you mean that a player can pick up some random diamonds and this would make the generators to keep working

mellow edge
#

yes

crude loom
#

Is your plugin at 1.8?

mellow edge
#

yes

#

1.8.8

crude loom
#

I actually plan to code a bedwars plugin at 1.8.8 as well haha

mellow edge
#

nice, it is not hard except for the shop and what I want now

crude loom
#

You could set a custom lore/title to the diamonds generated by the generator, and then only reset the generators if the item has that specific lore/title

#

A bit of a workaround, but should work

mellow edge
#

for example I give them the name: Diamondo

#

and then I rename them back when they are picked up

crude loom
#

That's a good idea, haven't thought about renaming but you are right you could rename it once the player has picked it up

mellow edge
#

thanks

#

we came to a solution together xD

crude loom
#

Yeah it will help me in the future as well xD

mellow edge
#

because in the real bedwars once the gen reaches X amount of items it freezes

crude loom
#

Yeah so it won't be to overpowered

shell bluff
#

Hello! I'm trying to play the block breaking animation using packets but it seems that Packet55BlockBreakAnimation is deprecated?

left swift
#

If I send plugin message channel (own), that get info from proxy and I want to send chat message with that info to certain player should I do it on proxy, or send it again to the server and here send chat message?

glossy venture
#

you can do it on the proxy

#

i think

left swift
#

Yes, but someone told me that it is better not to make plugins on proxies etc, so I wonder if it is better to return to the server with the player and handle messages here?

urban trout
#

hey guys how would i go about making a custom item plugin with a config to create custom items

midnight shore
#

Hi, how can i check if a crop block is fully grown?

glossy venture
#

and then check it against the max stage

#

no idea how to get that

prime kraken
#

Hello ! Is this possible to make methods for an inventory ? I explain. I try to make a paginated GUI, I have three inventory who correspond to page1, page2, page3, it is possible to make a method for the inventory and put the itemstack into this method and after juste make a player.openInventory(page1) ?

midnight shore
#

because i've got something using CropState but i don't know how to get the CropState of a Block

sterile grotto
glossy venture
#

@midnight shore cast the block data to Ageable and check it against the max age

prime kraken
sterile grotto
glossy venture
#

pretty sure thats it

prime kraken
sterile grotto
sterile grotto
#

you just need an object which stores all your pages

prime kraken
sterile grotto
#

you can use array to do that

prime kraken
#

Ok i was thinking about array but didn't how it's possible, i will serch about that

sterile grotto
#

just do this kind of stuff may work(or if you want, you can just use my API, which I will finish it later)

prime kraken
sterile grotto
prime kraken
ivory sleet
#

PotionEffect

#

?services this discord is not the place for advertisement @atomic zodiac

undone axleBOT
supple elk
#

I'm making a minigames plugin and I want to be able to control when people can break blocks or do various actions etc, so I need some kind of permission system

#

I was just wondering what people recommend for doing that

ivory sleet
#

could use luckperms

#

it has a transient permission api

#

else the already built in permission api should work fine? (Creating PermissionAttachments etc)

supple elk
#

mkay. Previously what I've done is use a class to wrap a player with a list of permission, then making listeners to check that

#

though that doesn't store across reloads

ivory sleet
#

ah

supple elk
ivory sleet
#

I mean this sounds like general state management

#

oh well

ivory sleet
#

you're managing a bunch of re-assignable variables of certain players, correct?

supple elk
#

I'm trying to control things like when players break blocks and stuff

supple elk
#

previously I created an enum of different permissions

#

then wrapped a player with a list of those

ivory sleet
#

let me ask ya, are all these "variables" just boolean flags? In that case an enum might be fine

supple elk
#

yeah they're booleans

#

so for example can a player break blocks

maiden briar
#
server.sendData();
player.sendData();

(Bungee) What is the difference?

supple elk
#

can a player interact etc

ivory sleet
#

server gets a random online player and send the message over that player's connection

#

whilst the latter makes sure the message is sent over the specific player's connection

supple elk
#

thinking about it now it's probably easier to just do that thing on a game specific basis?

ivory sleet
#

depends

#

if you set the material of your stack to a splash potion then it will be

maiden briar
ivory sleet
#

player.connect?

maiden briar
supple elk
ivory sleet
#

never seen that method

ivory sleet
maiden briar
#

Will do it like this:

//Creating arena, please wait...

JsonObject message = new JsonObject();
message.addProperty("task", "create");
message.addProperty("player", player.getName());
message.addProperty("name", name);
message.addProperty("type", gametype);

player.connect(server, (connected, throwable) ->
{
    if(!connected)
    {
        //Could not connect you to the server!
        return;
    }

    ArenaPlugin.getInstance().sendToBukkit(message, player);
}, ServerConnectEvent.Reason.PLUGIN);
ivory sleet
#

?jd-bc

supple elk
#

This is what I've done previously

ivory sleet
#
class SomeUserDataTransfer {
  final Set<Flag> flags = EnumSet.noneOf(Flag.class);

  void addFlags(Flag... flags) {
    flags.add(Arrays.asList(flags));
  }

  boolean hasFlag(Flag flag) {
    return flags.contains(flag);
  }
}

enum Flag {
  BREAK_BLOCK,
  PLACE_BLOCK
}
#

that'd be the most simple one

supple elk
#

yeah so pretty much the same

warm saddle
#

is there an event that listens just for players attacking players or do i have to use EntityDamageByEntityEvent

ivory sleet
#

becomes a bit trickier if you want to, lets say have parent and children flags

ivory sleet
#

idk actually

#

oh I dont have any examples but let me write one

supple elk
#

And is this better than using inbuilt perm system?

ivory sleet
#

idk

#

gonna be a bit faster

#

less friendly towards other plugins

#

altho more robust from your side

warm saddle
#

is there anything about this that would make this event just not work at all

#

like it doesn't even cancel

#

even if its a player attacking a player it doesn't run

#

nothing about it runs

ivory sleet
#

attacked == getPlayerExact(roles.get("blah"))

supple elk
#

Also do I have to use a wrapping class or can I extend CraftPlayer or something?

ivory sleet
#

perhaps print out the return value of roles.get("blah")

#

use a wrapper

supple elk
#

mk

warm saddle
#

one sec

ivory sleet
#

aight

harsh totem
#

I have this heal command and when I use it, I get healed but there is no message in chat and there is no sound

            double maxHealth = player.getAttribute(Attribute.GENERIC_MAX_HEALTH).getDefaultValue();
            player.setHealth(maxHealth);
            getServer( ).broadcastMessage(ChatColor.GREEN + "You were healed");
            player.playSound(player.getLocation(), Sound.ENTITY_ARROW_HIT_PLAYER , 1.0f, 1.0f);
        }```
#

why is that

warm saddle
# ivory sleet aight

i put the code to return the value that is in roles.get("Hunter") in the event and its not even sending the message or anything

#

so its like its not detecting the evebt

ivory sleet
#

did u register the event + annotated it with @EventHandler

warm saddle
#

oh

#

fuck

#

register the event

ivory sleet
warm saddle
#

might be helpful

ivory sleet
ivory sleet
#

not in spigot afaik, there's a lib for it and paper has that

lusty cipher
#

Is it common to use a permission as a integer value? say example.test.50? And the number has a different meaning that I parse in my code to determine some functionality for that player. Is that normal?

ivory sleet
#

Myes I've seen that type of design in several plugins

#

Idk if its concerned as a good practice nor common

lusty cipher
#

hmm ok, got a PR that reimplements something that way and was just checking if thats common

ivory sleet
#

but its definitively an occurrence

lusty cipher
#

I mean I could implement this in a more complicated way through a menu or from the config but I don't think I really do

#

This seems like a much simpler solution, while also being easier to use by admins that know permissions

ivory sleet
#

yeah

#

like the design is a bit awkward, but hey it works and have worked for the past years over the course of spigots development

warm saddle
warm saddle
ivory sleet
#

roles.get("thing") returns null

#

because passing null through Server/Bukkit::getPlayerExact wont work,since it requires an object

warm saddle
#

hm

#

it sends fine when i run the start command

#

odd

#

its in a public hashmap but the players names are put in there when a command is run, would that be an issue?

ivory sleet
#

I mean easiest way to avoid this could be with a null check

elfin atlas
#
error: invalid target release: 17.0.1

Module Tohka SDK 17 is not compatible with the source version 17.

Upgrade Module SDK in project settings to 17 or higher. Open project settings.

Does someone know why I'm getting this error when building?

left swift
#

each new Redis (Jedis) publish / subscribe Thread should use new Jedis connection?

elfin atlas
ivory sleet
#

but yeah dispatch the subscription on a new thread as iirc it will be blocking until termination

#

and then ofc try-w-resources JedisPool::getResource

left swift
#

👍 thank you!

chrome beacon
#

Are you using maven?

#

If so I had to do a manual install with the latest version because the bundled one was too old for Java 17 support

elfin atlas
left swift
ivory sleet
#

yes

#

force disable the subscription

#

if it doesnt disable in like lets say 30 seconds just interrupt the thread then

dark arrow
#

how can i find a specif block in a 6 blocks radius

ivory sleet
#

iterate through the volume until you find the wanted block

dark arrow
#

by iterating i am only able to go at positive , negative x,y and i can't diagnally

maiden briar
#
List<ServerInfo> servers = ArenaPlugin.getInstance().getFallbackServers();
ServerInfo server = CollectionUtil.pickRandom(ArenaPlugin.getInstance().getFallbackServers());

player.connect(server, (connected, throwable) ->
{
    if(!connected)
             ....
}, ServerConnectEvent.Reason.PLUGIN);

I have a list of given lobby servers. I want to connect the players to a random server of the list. If that fails the server should be removed from the list and then get another random server, until we have tried all servers or the player has successfully connected. How to do so? Because the connect method has an async consumer

#

@ivory sleet maybe u know?

left swift
#

And when I create subscriber, what will be better way, create only one subscriber and check message, switch / case and do operations, or create separate subscriber for each "action"?

ivory sleet
#

And map it

#

like map all the failing servers

maiden briar
tardy delta
#

CollectionUtil.pickRandom(servers); 🥲

maiden briar
ivory sleet
#

store one of those set instances per player

ivory sleet
#

I'd use a subscriber per feature

#

but entirely up to you

maiden briar
ivory sleet
#

also might wanna use ByteDataInput/Outputs

kindred valley
#

i dont know why when i always create something with for loop it always repeats it for twice

ivory sleet
#

and then the first writeVarInt/readVarInt determines the message format type

#

kinda like how mc operates

kindred valley
ivory sleet
#

mind sharing the code?

kindred valley
undone axleBOT
kindred valley
#

too complicated sorry

ivory sleet
#

oh god yeah

#

perhaps extract that into smaller functions

#

would be easier to maintain

kindred valley
#

actually it was way more complicated, i simplified but still like this...

dark arrow
#

i am unable to find the list of blocks and their data on spigot documentation does anyone have it?

eternal oxide
#

?jd-s

undone axleBOT
prisma needle
#

Player ping always 0

kindred valley
tardy delta
#

lot of bad things in that code aaaaa

prime kraken
#

Heeeeellllooo ! I've got one little problem, I made a multi-paged GUI, I have all the code nice, and I have juste one question. I use a list, when a player click on next page, i set up a p.closeInventory(); and to open the new page from the List : p.openInventory(inventories.indexOf(??????) + 1); but i don't know what to put ine the ???? a variable ? How may I have the current "List" i use ?

grim ice
#

@kindred valley u know World.toString() doesnt return its name

grim ice
#

@tardy delta btw ur status is wrong

#

everything depends on luck

tardy delta
kindred valley
tardy delta
grim ice
left swift
# ivory sleet JedisPool will handle that for you

When I'm using that jedispool should I do it with try-with-resources statement? Like

try (Jedis jedis = jedisPool.getResource()) {
    // do operations with jedis resource
}```or can i use normal jedisPool.getResource()... (I saw that code in one project)
left swift
#

why?

tardy delta
#

🥗

grim ice
#

personal opinion

prime kraken
# grim ice u wanna know the index of the inventory in the list?

I have the button Next page and Previous page. In my LIST i have 3 inventory corresponding of the three page, in my condition, I've put this when the condition is true : p.closeInventory(), p.openInventory(inventories.indexOf(????) + 1); and ??? correspond at : how can i get the actual open inventory in the list ?

tardy delta
#

make an index w-which starts at 1 and increment it when going to te next ppage

grim ice
#

@tardy delta is Inventory a singleton

rough drift
#

If I get an item from PlayerInteractEvent, can I just do itemStack.setAmount(itemStack.getAmount() - 1); to decrease?

grim ice
#

or is there a new instance for each open inventory

tardy delta
grim ice
#

Yikes

rough drift
tardy delta
#

thats not what a singleton is

rough drift
#

As it will close as soon as the try block closes

grim ice
tardy delta
#

shit wrong

rough drift
#

Lettuce auto closes it if I use try with resources

grim ice
#

fourteen

tardy delta
#

@hollow ruinClose kek

grim ice
#

answer

tardy delta
#

?singleton

grim ice
tardy delta
#

smh

grim ice
#

Nah

#

define it here

rough drift
# grim ice define it here
public class MyClass {
  private static final MyClass instance;

  private MyClass() {
    instance = this;
  }

  public static MyClass get() {
    return instance == null ? new MyClass() : instance;
  }
}
tardy delta
# grim ice answer

a singleton is a class which shouldnt be instantiated more than once and has its state static

tardy delta
rough drift
#

nope

#

instance is being set in the constructor

grim ice
#

a singleton is a class

#

that is only one object

tardy delta
#

wait lol

left swift
rough drift
#

yep

grim ice
#

actually

tardy delta
rough drift
#

as when the try() {} stuff ends it will close the connection

grim ice
#

static getter method part

#

isnt the thing at all times

#

you dont need that for it to be a singleton

tardy delta
#

or just static methods

grim ice
#

you dont need that either

#

Singleton pattern doesnt have anything to do with that

left swift
grim ice
#

It's only the restriction of how many times a class can be initialized

rough drift
#

or when a return statement is called

#

the connection will be closed

#

if you want that, use it

#

otherwise... don't

tardy delta
grim ice
#

youre missing the point if the constructor isnt private

fair breach
#

how can i crate a Array of Materials?

grim ice
#

if ur gonna do the getInstance thing

tardy delta
#

if the constructor is private you have a static getter ye

#

what are we even discussing lol

whole imp
#

You know a plugin with free tractor

grim ice
#

having a static getter without the class being private makes no sense

tardy delta
#

i know 🥺

grim ice
#

anyways

grim ice
#

or a simple array if u want

#

btw

#

@tardy delta

#

is there an inventory object for every player opening the inventory

#

i think not

tardy delta
#

no

midnight shore
grim ice
#

u dont wanna auto close it

#

after the try method ends

#

its a connection

ivory sleet
#

no its a connection pool

grim ice
#

shouldnt u only end it after ur program is done

#

o

ivory sleet
#

well tbf idk bout the design of jedis

#

so might be you're right

#

tho last time I checked the docs you're supposed to close after whatever you've done, basically lending it back

grim ice
#

i just use lettuce so idk too lol

ivory sleet
#

yeah

ornate patio
#

Bump from a really long time ago lol

ivory sleet
#

well lettuce has become more main stream

ornate patio
#

is there a tutorial

ivory sleet
#

especially since they added pub sub

tardy delta
#

what about using a try with resources for a db connection that comes from hikari?

ivory sleet
#

myes

quaint mantle
#

Anyone knows a good way to create fake fps user to a single user? I'm creating a freeze command that should also lag the player's fps

#

through packets

#

that doesn't lag the server

tardy delta
#

send a few thousand packets

quaint mantle
#

which packets tho

tardy delta
#

idk

quaint mantle
#

what's the most optimal way without causing server to lag

dark arrow
#

how to set data type of iron door from close to open

tardy delta
#

already googled it?

quaint mantle
#

I already have a for loop

#

I just need to find an optimal packet to send to a player

dark arrow
#

summon particles

#

particles are not much laggy

maiden briar
#
getProxy().getScheduler().runAsync(this, () ->
        {
            while(true)
            {
                ArenaManager.updateCache();
                playedArenaTable.updateCache();

                try
                {
                    Thread.sleep(1000);
                }
                catch(InterruptedException e)
                {
                    e.printStackTrace();
                }
            }
        });

Is this a good way to create a repeating async task on Bungee?

ornate patio
ivory sleet
#

use a scheduled executor service

maiden briar
#

?

ivory sleet
#

to repeat the task

#

much more optimized for what you're trying to do

tardy delta
#

wheres the break kek ah wait

maiden briar
#

Example? I have no idea what ur talking about

delicate lynx
#

use a regular task

#

it will be async

ivory sleet
#

1sec let me finish the valorant round

maiden briar
delicate lynx
#

Schedules a task to be executed asynchronously after the specified delay is up. The scheduled task will continue running at the specified interval. The interval will not begin to count down until the last task invocation is complete.

dense shoal
#

For OfflinePlayer.java, namely the method getLastPlayed();

    /**
     * Gets the last date and time that this player was witnessed on this
     * server.
     * <p>
     * If the player has never played before, this will return 0. Otherwise,
     * it will be the amount of milliseconds since midnight, January 1, 1970
     * UTC.
     *
     * @return Date of last log-in for this player, or 0
     */
    public long getLastPlayed();```
Where is this data actually stored?
delicate lynx
#

playerdata

tardy delta
#

anvil files

ivory sleet
#

tvhee ^

dense shoal
dense shoal
delicate lynx
#

in the world's playerdata

#

yes

tardy delta
#

ah i removed the whole world once to get rid of the playerdata

#

test server but ye

dense shoal
#

Is there logic present (in spigot) that if you have multiverse or something installed, it will get it from the oldest world?

tardy delta
#

dont think so

dark arrow
#

how can i get block state of iron_door

dense shoal
#

Like getState()?

tardy delta
#

mate this is one search in google


Door door = (Door) block.getState();
door.setOpen(true);
#

not sure if you have to do it on both parts

dense shoal
# tardy delta dont think so

Is there some kind of sync between world, world_nether, or world_the_end that would get the oldest or something? Or is it the last time the player played on that specific map in terms of getLastPlayed()?

tardy delta
tardy delta
dense shoal
dark arrow
tardy delta
#

i think just the last world

dense shoal
#

gotcha

tardy delta
tardy delta
#

check what i posted below

#

and check if the block is even a door before casting

dark arrow
#

yah i did that

#

using if condtio

tardy delta
#

show me

dark arrow
# tardy delta show me
 if(block.getType().name().equalsIgnoreCase("IRON_DOOR")||block.getType().name().equalsIgnoreCase("IRON_TRAPDOOR")){
                Openable door = (Openable) block.getState();
                door.setOpen(true);
                block.setBlockData(door);
             }
brittle lily
#

Hey Guys Can I Set my Custom Zombies For dont burn under the sun. without helmet or something like that

tardy delta
#

if block.getState instanceof Openable

#

or smth

#

never check the name() to compare enums, you can do if getType() == Material.SOMETHING

dark arrow
#

oh

noble lantern
#

Well name can be useful tbf

#

Its good if you want multi version support

tardy delta
#

ye but not in this case

noble lantern
#

So you don't get errors in your plugin

dark arrow
#

and there is no console error

tardy delta
#

uhm show code i guess

dark arrow
#
 if(block.getState() instanceof Openable){
                Openable door = (Openable) block.getState();
                door.setOpen(true);
                block.setBlockData(door);
             }
tardy delta
#

dunno how block data works but are you sure you have to set the data?

kind hatch
#

IIRC, Java 8

delicate lynx
#

woops did not mean to reply

dark arrow
#

ahh crap

#

i am so dumb

#

there is no setstate method?

delicate lynx
#

try to do block.getBlockData() instance of Openable

dark arrow
#

I am trying to set the state of block to be opend

tardy delta
#

block date?

delicate lynx
#

oops

dark arrow
tardy delta
#

lets go on date with a block

delicate lynx
#

looking at the forums, people are checking what I said

tardy delta
#

which block would you like @delicate lynx

delicate lynx
#

you have everything else correct but you are checking the wrong instanceof

#

there are too many blocks for me to pick :/ I don't have a favorite

maiden briar
#

Is there any way to set the joinlocation BEFORE the player has fully logged in?

tardy delta
#

did you try?

maiden briar
tardy delta
#

heh

maiden briar
#

In PlayerLoginEvent

dark arrow
#

blockdata also does not work bruhhh

maiden briar
#

I get Minecraft world errors

tardy delta
#

delay it a few ticks?

maiden briar
crude loom
#

Is there a way to prevent mobs from entering a specific region?

delicate lynx
# dark arrow blockdata also does not work bruhhh

I just tried this code, it works

Block block = event.getBlock();
if (block.getBlockData() instanceof Openable) {
    Openable door = (Openable) block.getBlockData();
    door.setOpen(true);
    block.setBlockData(door);
}
#

you have to check the blockdata, not the state

#

you were doing Openable door = (Openable) block.getBlockState();

kindred valley
#

what is the name of anvil sound effect

delicate lynx
#

which one

kindred valley
#

anvil

noble lantern
noble lantern
#

just

#

letting you know now tho

#

that event sucks to work with

delicate lynx
#

there are a few anvil sound effects

kindred valley
#

event?

delicate lynx
#

placing, breaking, etc

noble lantern
#

OH

#

sound effect

#

thought it said event mb

kindred valley
noble lantern
#

1.0f normally

maiden briar
maiden briar
mellow edge
#

I have a really hard time with:

crisp steeple
#

i do as well

mellow edge
#

I want to remove in total of 4 diamonds that can be in any slot, for example if the inventory is the following: 64 iron, 10 iron, 2 iron, 7 iron || in the total I want it to look like that **60 iron**, 10 iron, 2 iron, 7 iron

crisp steeple
#

pretty sure there’s a method to remove multiple items from an inventory

tardy delta
#

maybe?

#

aight

crisp steeple
#

lol

tardy delta
#

got ninjad

mellow edge
#

that should remove in total of 4 diamonds?

#

if I make the item stack like that: new ItemStack(Material.DIAMOND, 4);

#

it works!

#

thanks @crisp steeple @tardy delta

crisp steeple
#

gg

grim ice
#

and teleport them

maiden briar
grim ice
#

they prob wouldnt see it

#

except if they have ultra fast pcs

crude loom
#

How do I set lapis in an enchantment table?

grim ice
#

login event is before join event as far as i know

#

actually

#

use PlayerSpawnLocationEvent

river oracle
#

PlayerCopeEvent

pastel relic
#

Cannot resolve method 'getDescription' in 'PlayerJoinEvent' how do I fix this?

delicate lynx
#

that isn't a method

pastel relic
#

uh

river oracle
#

It isn't a method

dusty herald
tardy delta
#

fell

#

you noob

pastel relic
#

smh

dusty herald
#

ok

grim ice
#

PlayerCringeEvent

tardy delta
#

da moment when im trying to do a conversation

pastel relic
delicate lynx
#

you pass it your plugin instance

pastel relic
#

wot

delicate lynx
#

plugin.getDescription()

crisp steeple
#

consumer doesn’t have a getDescription method

dusty herald
#

bruh u just copy pasted it

grim ice
#

yep he copy pasted

pastel relic
#

?

#

I did from my main class

#

I just had it run in the console

left swift
grim ice
#

@pastel relic listen

crisp steeple
grim ice
#

u copy pasted it from some website

#

but in that website

#

they did it in their main class

#

rn ur not

#

ur using it in another class, not the one tht extends JavaPlugin

crisp steeple
#

?learnjava moment

undone axleBOT
pastel relic
#

sorry, followed a course im new to this

pastel relic
#

ok, nvm I didn't

dusty herald
#

You can't have two classes that extends JavaPlugin

pastel relic
#

ik that

dusty herald
#

You need to dependency inject your main class into that listener class

dusty herald
#

the main class being the one that extends JavaPlugin

dusty herald
pastel relic
#

and, how do that?

grim ice
#

You dont own me

dusty herald
#

I do own you

pastel relic
#

jesus why do ya'll argue in the wrong channel

grim ice
#

We arent obliged to help you

delicate lynx
#

dependency injection my beloved ❤️

crisp steeple
#

controversial opinion: static getter is ok for javaplugin if you aren’t planning on expanding it much

dusty herald
#

someone link a tutorial on dependency injection

delicate lynx
#

?di

undone axleBOT
crisp steeple
#

ok 👍

dusty herald
#

<3 don't really

crisp steeple
#

awesome

tardy delta
#

lol di is much cleaner

grim ice
#

It's a singleton, and a static getter is the primary way to reach out singletons

inner lintel
#

Hey so i started creating configs with the method that Y2K_ showed me but I’m bit confused, not setting it up i did as he said but more to I’m not sure how to use the config now to like add lets say messages from customconfig like game mode.yml and i want to get the string of path creative: “bla bla bla” how would i implement it. https://paste.md-5.net/makedanabi.java and here is for the main class what i had to do https://www.toptal.com/developers/hastebin/ejesoviyow.kotlin

grim ice
#

its annoying to do

tardy delta
#

yes

grim ice
#

the larger your project

tardy delta
#

smh youre annoying

#

jk

grim ice
#

the more u get annoyed by it

tardy delta
#

smh

grim ice
#

making a variable and a constructor and a parameter is too much work for me

dusty herald
#

not really? I just make templates for the classes I use the most

grim ice
#

see

#

proving me right

dusty herald
#

not reallt

grim ice
#

you had to go through the efforts to make a template

inner lintel
dusty herald
#

I didn't have to I wanted to

grim ice
#

di is awesome, but not in this specific case, it's not the best option at least

crisp steeple
#

say you were making a library or something

grim ice
#

that contradicts ur statement

#

u said

#

"for java plugin"

#

a library has no class that extends jp

crisp steeple
#

say you were making a library that also functions as a plugin

#

ex: protocollib

grim ice
#

you would make it into a different module then

crisp steeple
#

point still stands

grim ice
#

nope

#

literally no point

#

No library has a class extending JP

crisp steeple
#

unless it’s a library that also functions as a plugin

inner lintel
grim ice
crisp steeple
#

not everyone makes an api for things

#

was about to say that

grim ice
#

since ur hooking into the plugin

#

then your point is wrong

#

you said library not api

crisp steeple
#

what

grim ice
#

thats wrong terms

#

that aint a library anymore

#

its an api

crisp steeple
#

not if it’s not an api

#

lmao

#

and just a plugin that lets you use methods

grim ice
#

ur not making any sense

crisp steeple
#

you can have a plugin

#

that does things to a server

#

and you can import that same jar

#

and use it in your plugin

grim ice
#

thats an api then

crisp steeple
#

that would not be an api

#

it would be a plugin

grim ice
#

you hooked into the plugin

#

did u just change ur statement

#

what u were saying minutes ago isnt what ur saying now

#

lol

crisp steeple
#

what are you on about

inner lintel
#

Agreed

grim ice
#

proving you wrong

crisp steeple
#

this is some major spigotmc drama

grim ice
crisp steeple
grim ice
#

its a simple argument

crisp steeple
#

i’m joking

grim ice
#

lol

inner lintel
#

2Hex made a good point

crisp steeple
#

i don’t see what he means

#

if i have a plugin

#

that i can use in my project

#

i would not call that an api

grim ice
#

if you hook into a plugin its an api

#

a library uses your own plugin, an api only gets hooked into, it doesnt use ur plugin

inner lintel
#

Basically you changed your statement from talking about library to it being a api which makes it a api

grim ice
#

dont look at it from a spigot angle

crisp steeple
#

i understand that my point originally didn’t really matter since a library never has javaplugin

grim ice
#

look at it as java

crisp steeple
#

about?

inner lintel
#

Exactly

crisp steeple
#

i’m not talking about a library anymore

grim ice
#

You literally keep changing what you say

#

every few minutes

#

and it contradicts itself

sacred mountain
#

isnt api just something you use in your plugin, dependency is a plugin that you use in your plugin

grim ice
sacred mountain
#

library ? i dunno

inner lintel
#

Bruh wasn’t we just talking about how you are confusing library with an api when thinking about it in a java standpoint what u are considering a library is an api

sacred mountain
#

oh right ok

crisp steeple
#

i wasn’t “confusing” a library with api

grim ice
#

deotime whats your point now

crisp steeple
#

it just was pretty obvious you would use dp injection in a library so it didn’t really matter

inner lintel
#

Ok ok lets do this

#

Deotime state your main point

#

And we go from there

crisp steeple
grim ice
#

it is an api

crisp steeple
#

i do not agree

grim ice
#

Youre hooking into it

crisp steeple
#

an api would be something that uses that plugin and provides it in a user friendly way

inner lintel
#

Wait deotime why do you think its not an api

grim ice
#

and using its methods

crisp steeple
crisp steeple
#

but it’s not

grim ice
#

Then what is it

crisp steeple
#

api - application programming interface

grim ice
#

dont use any spigot terms

#

what is it

#

in pure java

crisp steeple
#

an api is an application programming interface

grim ice
#

if i import a jar into my java project

#

what is it

#

i know what an api is, thank you thats not what i asked

crisp steeple
grim ice
#

Wrong

crisp steeple
#

not wrong

grim ice
#

Oh dear god

eternal oxide
#

a dependency

grim ice
#

this is what a library looks like

inner lintel
#

Yep

crisp steeple
#

i thought we weren’t using spigot terms 🤨

grim ice
#

Yes?

crisp steeple
#

if you imported a plain jar

#

into a java project

#

that would be more accurately a dependency or library

grim ice
#

we never used any spigot terms yet

inner lintel
#

Opps wrong chat sorry if i say random things ignore i got like 4 different arguments that I’m monitoring rn

crisp steeple
#

an api is somewhat of a middleman

#

between you and the program you are connecting to

#

a library would be directly importing the program

grim ice
#

Dude

grim ice
#

an api

#

is a hook to a program running

crisp steeple
#

that just isn’t true

eternal oxide
#

its not

grim ice
#

Mm? then what is it

left swift
eternal oxide
#

An API is simply how you interact with another resource