#help-development

1 messages Β· Page 1580 of 1

onyx cradle
#

right now the left on is but the right one is not

earnest lark
#

no there both bungee but it still doesnt work

worldly ingot
#

You're also just doing a hell of a lot of stuff that doesn't make any sense at all

#

Text is something you would pass to a HoverEvent. That's it

#

You're trying to invoke methods that would be called on a BaseComponent of some sort. You likely are wanting a TextComponent

earnest lark
#

thats what im saying

#

he told me i was wrong

worldly ingot
#

Though really, the ComponentBuilder is probably what you want to be using anyways

earnest lark
#

bruhhhh

onyx cradle
#

component builder is deprecated

#

or rather

worldly ingot
#

wat

onyx cradle
#

its usage in HoverEvent is

worldly ingot
#

No it's not

#

Yeah, in HoverEvent it is

#

You pass in a Text object there. Though that's not what he's trying to do above

onyx cradle
#

thats what im helping him to do

#

he needs to make Text first though

worldly ingot
#
ComponentBuilder builder = new ComponentBuilder();
builder.append(player.getName()).append(" would like to duel you")
    .color(ChatColor.BLUE)
    .bold(true)
    .hoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, new Text("Click here to accept the duel")))
    .clickEvent(new ClickEvent(ClickEvent.Action.RUN_COMMAND, "whatever command you want to run"));

player.spigot().sendMessage(builder.build());```
#

afaic, that's all you need

#

Though some methods may not be 1:1, I did write that all in Discord from memory. I probably fucked up a name

onyx cradle
#

i think thats right

#

its pretty much just what he had before

#

but with Text instead of ComponentBuilder

ivory sleet
#

Rare occurrence seeing choco spoonfeeding

worldly ingot
#

Sometimes I have some additional spoons laying around

earnest lark
#

lol.

hybrid spoke
#

any1 here up for a small code review? aPES_Think

quaint mantle
#

Yes.

ivory sleet
#

Yeah

hybrid spoke
worldly ingot
#

I see the word Async in the context of world-related features and I get scared

ivory sleet
#

Async = good PES_Blush

worldly ingot
quaint mantle
#

lmfao

hybrid spoke
#

its not async. its the same principle like FAWE

quaint mantle
#

choco can I get my verified role

#

usage

#

My old discord got hacked

#

so....

earnest lark
#

"small code"

hybrid spoke
#

return true should print the usage in the chat. but since there is none shrug

hybrid spoke
earnest lark
#

for me it is

worldly ingot
quaint mantle
#

What do you guys think of Wynncraft?

#

imo, amazing

ivory sleet
#

It’s pog

hybrid spoke
quaint mantle
#

what is wynncraft

#

Bro

#

its so wellmade

north ridge
hasty prawn
#

Wynncraft is cool

ivory sleet
#

Lmao yugi

quaint mantle
#

what is XSeries

#

What if we all banded together to make a server like wynncraft ;3

ivory sleet
#

Tho u should verify

north ridge
#

Doesnt that need me to login

#

😣

ivory sleet
#

Uh you need a spigot account

hybrid spoke
ivory sleet
#

I assume you got one

quaint mantle
#

Haha

north ridge
#

Yea I have an old one

quaint mantle
#

I know

north ridge
#

Maybe later

quaint mantle
#

gonna be hard and shit

#

to get people to play

earnest lark
#

hoverEvent is not in componentbuilder

quaint mantle
#

ig

hybrid spoke
#

to even get a team

quaint mantle
#

yeah

ivory sleet
north ridge
hybrid spoke
#

whats wrong with that?

ivory sleet
#

Lucifer my only comment on this code would be to extract smaller methods from the command one to make the code more polite.

hasty prawn
#

You call .next() twice

ivory sleet
#

πŸ₯²

north ridge
#

😌

hybrid spoke
ivory sleet
#

No

#

Because you will be naming those functions accordingly

hybrid spoke
hasty prawn
#

Okay well it's always gonna skip the first block

hybrid spoke
#

but i could try myself at it

ivory sleet
#

Myeah because currently that method of yours is jumping from low to high level and doing all crazy sort of things.

hybrid spoke
#

oh true, thanks. forgot that

onyx cradle
#

why are so few plugins made with Kotlin? I feel like it would be more popular by now

hybrid spoke
#

yes and yes. it makes the code more clean to have f.e. a wrapper for an int which is just an id.

ivory sleet
#

adds another layer of complexity

#

BanePig

earnest lark
#

hoverEvent is not in compoundbuilder what could i use to replace it

hybrid spoke
onyx cradle
#

it is another dependency but it is soooo much nicer to code in

ivory sleet
#

Yeah also about the static, is it really necessary?

#

Not everyone would agree to that

earnest lark
#
                builder.append(player.getName()).append(" would like to duel you")
                        .color(ChatColor.BLUE)
                        .bold(true)
                        .event(new HoverEvent(HoverEvent.Action.SHOW_TEXT, new Text("Click here to accept the duel")))
                        .event(new ClickEvent(ClickEvent.Action.RUN_COMMAND, "whatever command you want to run"));```
this should work now right?
#

import net.md_5.bungee.api.ChatColor;
import net.md_5.bungee.api.chat.ClickEvent;
import net.md_5.bungee.api.chat.ComponentBuilder;
import net.md_5.bungee.api.chat.HoverEvent;
import net.md_5.bungee.api.chat.hover.content.Text;
import org.bukkit.Bukkit;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;

import java.awt.*;

public class duelcmd implements CommandExecutor {

    @Override
    public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
        if (command.getName().equalsIgnoreCase("duel")) {
            Player player = (Player) sender;
            if (args.length != 1) {
                return false;

            }

            if (args.length == 1) {

                ComponentBuilder builder = new ComponentBuilder();
                builder.append(player.getName()).append(" would like to duel you")
                        .color(ChatColor.BLUE)
                        .bold(true)
                        .event(new HoverEvent(HoverEvent.Action.SHOW_TEXT, new Text("Click here to accept the duel")))
                        .event(new ClickEvent(ClickEvent.Action.RUN_COMMAND, "player2"));
                
                String target = args[0];

                Player targetplayer = Bukkit.getServer().getPlayer(target);
                targetplayer.sendMessage(player + "would like to duel you");
                
                targetplayer.sendMessage(String.valueOf(builder));

                player.sendMessage(targetplayer + "has been invited to a duel");
                player.performCommand("player1");

            }
            return true;
        }
        return false;
    }
}
#

i now need to make it so that after the duel is accepted the second command will run

hybrid spoke
#

?paste

undone axleBOT
hybrid spoke
#

⬆️

earnest lark
hybrid spoke
#

thanks for the feedback guys πŸ‘

earnest lark
#

i do need to check if the sender is a player because you cant have the second person dueling the concole can you

#

and yes i dont know how to spell concole

ivory sleet
hybrid spoke
onyx cradle
#

What reasons could there be for not having correct permissions?

main: com.github.budgettoaster.infinitystones.Core
name: InfinityStones
version: 1.0
api-version: 1.17
description: "Creates infinity stones throughout the multiverse."
author: BanePig

commands:
  stones:
    description: "Base command for infinity stones plugin."
    usage: "/stones <subcommand>"

permissions:
  infinitystones.basic.locate:
    description: "Allows you to locate infinity stones."
    default: not op
  infinitystones.admin.whereis:
    description: "Allows you to get the exact location of an infinity stone."
    default: op
ivory sleet
#

Alrighty

earnest lark
#

how could i make it so once the command is accepted the sender puts a command

#

is there something like a ```if (command.ran()) {
player.preformcommand();
}

#

yea i already have that

#

ok

#

ok mabey i could make another class then add the duel accept command then make both of them do the commands i already have

#

i have a clickevent

#

ugh fine

#

ok i have an idea

#

i have a whole seperate command that gets run through the click event and it teleports the players and gives them both the gear that they need

#

wait i cant do that

#

ok can i teleport the players strait through the click event

tame fern
#

Why can't I use a Custom Chunk Generator with an Amplified world?

muted idol
#

hey there how would i go about checking if a json file is empty / check if a jsonobject is empty.
code:

      if (checkpointsObj.isEmpty()) {
            registerJSON();
        }

    }

    public void registerJSON() {
        try {
            checkpointsObj.put("CheckpointCounter", -1);
            FileWriter WriteJSON = new FileWriter(CheckpointsCounterFile);
            WriteJSON.write(checkpointsObj.toJSONString());
            WriteJSON.close();
            getServer().getConsoleSender().sendMessage("[Parkour]"+ ChatColor.GREEN+" A JSON file was missing necessary info added it now!");
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
``` for some reason this code works and changes my json file to this `{"CheckpointCounter":-1}` which is how i want it but then if i try to change my jsonfile to something like `{"CheckpointCounter": 2}` and then reload my server it changes it back to -1 but the obj is not empty
quaint mantle
#

Hello someone can helpme? i get this error

java.lang.NullPointerException: Cannot invoke "java.sql.Connection.createStatement()" because the return value of "lib.PatPeter.SQLibrary.Database.getConnection()" is null
        at lib.PatPeter.SQLibrary.Database.query(Database.java:241) ~[?:?]
    public final ResultSet query(String query) throws SQLException {
        queryValidation(this.getStatement(query));
        Statement statement = this.getConnection().createStatement();
        if (statement.execute(query)) {
            return statement.getResultSet();
        } else {
            int uc = statement.getUpdateCount();
            this.lastUpdate = uc;
            return this.getConnection().createStatement().executeQuery("SELECT " + uc);
        }
    }
hasty prawn
#

this.getConnection() is null

quaint mantle
#

yes ik, so how i fix that

hasty prawn
#

Create a Connection and set it to whatever getConnection() returns

quaint mantle
#

it was works befor
i just trying to change my spigot plugin to paper plugin if it possible

onyx cradle
#

what is getConnection()

quaint mantle
#
public final Connection getConnection() {
        return this.connection;
    }
hasty prawn
#

And what is this.connection

quaint mantle
#

import java.sql.Connection;

protected Connection connection;

hasty prawn
#

Yeah connection isn't set to anything

quaint mantle
#

but how it works befor and now not

hasty prawn
#

Shouldn't have worked before

onyx cradle
#

when do you initialize it

earnest lark
#

is there any way to get something like player.preformcommand in a click event?

paper viper
#

for chat?

earnest lark
#

player.preformCommand(""); is already in chat i just need to know how to get it into a click event

vital ridge
#

Could you explain ur plugin

earnest lark
#

it is a duel plugin and i alrready have a kits plugin and another plugin for teleporting into the arena i just need to get the commands into the click event for it to teleport the people

whole stag
#

Is there documentation for the plugin.yml file anywhere? I couldn't find it in the API

ivory sleet
#

Spigot wiki I believe

onyx cradle
#

why do SheepDyeWoolEvent not tell who dunit

whole stag
#

Indeed

sage swift
#

look up component api

earnest lark
#

if you looked at the code for a second i already have a click event i just need to get that code somehow incorperated into it

vital ridge
#

Tbh, I do not understand what does the .performcommand do

sage swift
#

you want the player to perform a command for someone else?

vital ridge
#

I've never used it myself.

sage swift
#

gooooood luck

#

the component only forces the player to run the command

#

to do a console-level command you would have to keep track of who can and can't do it and do something special based on a hidden command

#

CMI has a feature like that but it's a very difficult thing to accomplish

vital ridge
#

Well I still cant understand what he tryin to accomplish, why would you need to run a command for someone?

earnest lark
#

i accualy just relized that i need something that detects if the clickevent has happened any ideas

vital ridge
#

I mean just listen to the event

#

thats it?

vital ridge
#

You just need to create an event

deep sail
#

Just curious, has anyone ran a minecraft client through an mc plugin?

earnest lark
#

no

vital ridge
#

Its possible?

#

I've seen it couple of times yea but I've never looked into it

deep sail
#

Ah i've never seen it before might try it since im bored lol

paper viper
#

you'd have to make sure the server has minecraft installed first tho (client)

#

not all servers have the client

magic glacier
#

hey does anyone know how to make a compass track a specific player?

vital ridge
#

#setTarget?

vital ridge
#

pretty much what rack sent.

magic glacier
onyx cradle
#

is there a way to check if an air block would collide with a player if it were solid

#

oh nvm block has a collisionShape

onyx cradle
vital ridge
#

if he interacts with the compass

#

you set the compass target

gleaming grove
#

Does somebody know how to invoke "render" method in MapRenderer interface?

sullen marlin
#

it's invoked by the server as required

gleaming grove
#

ok, do you think server can handle if i will stream pixel video data from WebSocket to minecraft map?

sullen marlin
#

trying to play a video on a map is very bad for performance

#

if its just images, sure

twilit vector
#

What version of java does 1.17 need?

gleaming grove
#

16

twilit vector
#

oh

#

mine is 8 and it tells that this is the latest

gleaming grove
#

try to update your JDK

twilit vector
#

ohk

gleaming grove
#

if you are using Inteliji its here

twilit vector
#

okay

#

thanks!

fierce swan
#

For my plugin I'm trying to go about showing text in a sign to a player through ProtocolLib, and I've seen I need to send a BlockChange event to place the sign followed by a packet to open the sign editor from the server to the client.

The BlockChange is working just fine, but the OpenSignEditor packet isn't, and it crashes with this error. Here's my code for opening the sign (this.blockLocation is a Location for the sign and this.p is the Player):

public void open() {
    PacketContainer blockChange = ProtocolLibrary.getProtocolManager().createPacket(PacketType.Play.Server.BLOCK_CHANGE);
    blockChange.getBlockPositionModifier().write(0, new BlockPosition(this.blockLocation.toVector()));
    blockChange.getBlockData().write(0, WrappedBlockData.createData(Material.SIGN_POST, 0));
    try {
        ProtocolLibrary.getProtocolManager().sendWirePacket(this.p, WirePacket.fromPacket(blockChange));
    } catch (InvocationTargetException e) {
        e.printStackTrace();
    }

    PacketContainer openSign = ProtocolLibrary.getProtocolManager().createPacket(PacketType.Play.Server.OPEN_SIGN_EDITOR);
    openSign.getBlockPositionModifier().write(0, new BlockPosition(this.blockLocation.toVector()));
    try {
        ProtocolLibrary.getProtocolManager().sendWirePacket(this.p, WirePacket.fromPacket(openSign));
    } catch (InvocationTargetException e) {
        e.printStackTrace();
    }
}
#

If this is the wrong place to ask then I can delete but I felt like this should be a good place

twilit vector
gleaming grove
#

Well if this error is not self explanatory i would recommend to restart pc

twilit vector
#

okay i will restart

#

thank you

fierce swan
twilit vector
#

Is there another way of uninstalling a specific version of java

#

Oh it worked

#

I had to uninstall the java that i recently installed and then install the java for windows offline installation

gleaming grove
#

i glad that you resolve the problem

static whale
#

So I know that you can take an NMS ItemStack and convert it to a Bukkit one with getBukkitStack(), but is the reverse possible? I tried checking the API but I couldn't find any leads.

somber hull
#

How do i delete a plugin

#

From my plugin

fierce swan
static whale
fierce swan
#

Np!

fierce swan
#

Just thought to mention that in case you wanted to know for some reason lol

static whale
#

yeah i also saw that pop up, but thanks a lot i appreciate it

twilit vector
#

when i search for java in the windows search thing i cant see the configure java and stuff i used to see earlier(earlier = when i has java 8). Instead i see this java(in pic) and when i open this it shows a command prompt window for half a second and then disappears(this started happening when i installed java 16).
Is this an issue to worry about?

quartz ferry
#

I havent coded plugins in a strong while, how do i get build tools again for spigot, I searched up tuts and still cant do it

drowsy helm
#

?bt

undone axleBOT
drowsy helm
#

theres a download on that page

#

then it gives you a sample run.bat to use aswell

#

oops

quartz ferry
#

any direct way of installing it?

fierce swan
#

Minecraft is built on java 8

quartz ferry
#

im playing mc rn

#

?

fierce swan
#

To develop for minecraft

quartz ferry
fierce swan
#

I'm trying to figure out my own packet problem rn :c

fierce swan
quartz ferry
drowsy helm
quartz ferry
fierce swan
quartz ferry
fierce swan
#

No

#

In the terminal

quartz ferry
#

how would you direct it?

fierce swan
#

?

quartz ferry
# fierce swan ?

" you'll just need to use a direct path to java 8 when you run buildtools"

fierce swan
#

Yeah

#

Like

#
C:\PATH\TO\JAVA\8\java.exe -jar BuildTools.jar --rev v1.BLAH
quartz ferry
#

inside of the folder that build tools is in right?

fierce swan
#

Yes

quartz ferry
#

why is there v1

fierce swan
#

Did you read the buildtools page

quartz ferry
onyx cradle
#

why does Player and OfflinePlayer both exist if the Player javadocs says "Represents a player, connected or not"

fierce swan
#

It uses the mojang api to convert from UUID to playername and vice versa

quartz ferry
drowsy helm
#

it is not deprecated?

fierce swan
drowsy helm
#

what context are you talking about

fierce swan
onyx cradle
#

where is player actually implemented

#

ik i mean where are the methods implemented

#

like what file

#

im trying to look inside

#

oh thats NMS

onyx cradle
#

thats the interface

#

it doesnt actually have implementations just declarations

magic surge
#

If I wanted to edit bungeecord to allow connections where you can /server a proxy, is that possible?

onyx cradle
#

yes thats it ty

fierce swan
quartz ferry
fierce swan
#

I-

quartz ferry
#

pasted wrong thing

#

C:\PATH\TO\JAVA\8\java.exe -jar "BuildTools (2).jar" --rev v1.8

fierce swan
#

Ok so the PATH\TO\JAVA\8 was a placeholder you were supposed to replace with your actual path to java 8

quartz ferry
#

i accidentaly had my failed try posted this was my 2nd try

quartz ferry
fierce swan
#

No

#

You cd to the folder buildtools is in

#

And replace the path at the beginning of the command

#

With the path to the java installation

quartz ferry
#

how do i find it?

fierce swan
#

It should have said it when you were installing it

quartz ferry
#

i didnt install java 8 yesterday. . .

fierce swan
#

???

#

You were supposed to install it now since you didn't have it

quartz ferry
#

obviously i dont remember it and i did have it apparently

#

nvm i found it

#

so like this?

#

C:\Program Files\Java\jdk1.8.0_281\java.exe -jar BuildTools.jar --rev v1.8

fierce swan
#

Yes

#

Exactly like that

quartz ferry
#

c:\program is not recognized

fierce swan
#

You need quotes around the path

#

If you tab complete the path as you make it then it'll put them there automatically

quartz ferry
#

from c:\ to exe?

fierce swan
#

No

#

I said quotes

#

I never said exe

#

OPH

#

Nvm yeah

#

yeahyeah

quartz ferry
#

thats not what i mean

fierce swan
#

Sorry I misinterpreted that

#

Yes put quotes around that

quartz ferry
#

'"C:\Program Files\Java\jdk1.8.0_281\java.exe"' is not recognized as an internal or external command,
operable program or batch file.

fierce swan
#

Put an & before it like this:

& 'C:\Program Files\Java\jdk-11.0.10\bin\java.exe' -jar BuildTools.jar --rev v1.8
quartz ferry
#

& was u nexpected

#

any direct way to install them?

fierce swan
#

What do you mean

quartz ferry
#

that was the error

#

& is unexpected

fierce swan
#

Can you send a screenshot of your window, not copy paste but an image

quartz ferry
#

i tried

fierce swan
#

Oh? nvm then

#

Uh

#

Wait yes it can I sent one earlier

quartz ferry
#

& 'C:\Program Files\Java\jdk-11.0.10\bin\java.exe' -jar BuildTools.jar --rev v1.8

fierce swan
#

First of all you put the path to your java 11 executable and not the java 8 one

#

Second of all try running that in powershell

quartz ferry
#

its isntalling now in powershell but this happened before i need to see it if installs the jar

fierce swan
#

What do you mean install because all Buildtools does is make a jar in the same folder

quartz ferry
#

lemme try removing v

fierce swan
#

Yeah that's it

#

Idk why I put a v there initially

quartz ferry
#

is the jar gonna appear in the main folder or is it gonna appear in a folder inside of it?

fierce swan
#

Should appear in the main folder

quartz ferry
#

ok

quartz ferry
fierce swan
#

Depends on what you're using them for, if you're using them to run a server then move this over to #help-server as I can't help with that, but for programming then for most purposes 1.8 should be fine for all of them I'd believe

crisp citrus
#

I have a function that sets a bunch of NamespacedKeys to a player's persistentdatacontainer. However, when this function is fired, the PersistentDataContainer remains empty.
Code: ```java
public static void createPDC(Player p) {
PersistentDataContainer pdc = p.getPersistentDataContainer();
if (p.isEmpty()) { // only create the pdc if the player doesnt alr have one
pdc.set(PlayerData.pdcUsername,PersistentDataType.STRING,p.getName());
pdc.set(PlayerData.pdcUUID,PersistentDataType.STRING,p.getUniqueId().toString());
pdc.set(PlayerData.pdcIPAddress,PersistentDataType.STRING,p.getAddress().toString());
pdc.set(PlayerData.pdcSpectateX,PersistentDataType.DOUBLE, 0.0);
pdc.set(PlayerData.pdcSpectateY,PersistentDataType.DOUBLE, 0.0); // no, no it is not
pdc.set(PlayerData.pdcSpectateZ,PersistentDataType.DOUBLE, 0.0);
pdc.set(PlayerData.pdcCanFly,PersistentDataType.BYTE, (byte) 0); // PersistentDataType.BOOLEAN doesnt exist yet, so 0 means false and 1 means true
pdc.set(PlayerData.pdcGodMode,PersistentDataType.BYTE, (byte) 0);
pdc.set(PlayerData.pdcKeepIllegals,PersistentDataType.BYTE, (byte) 0);
pdc.set(PlayerData.pdcInVanish,PersistentDataType.BYTE, (byte) 0);
// pdc.set(PlayerData.pdcSomething,PersistentDataType.BYTE, (byte) 0);

        Bukkit.getLogger().info("Generated PDC for player "+p.getName());
    } else {
        Bukkit.getLogger().warning("Incorrect function call: player "+p.getName()+" already has a PDC");
    }
}```Is this an issue with the way I am implementing this or is this just not how PDCs work
onyx cradle
#

if an entity exists but hasnt been spawned in yet, can it still be found with its UUID?

crisp citrus
#

no

onyx cradle
#

darn

crisp citrus
#

i dont know anything about protocollib aaaaaaa

fierce swan
#

You're fine !

crisp citrus
#

mostly because so far i havent had to deal with packets

#

thank god for that, theyre complicated asf

fierce swan
#

I mean making a sign pop up is proving to be a pain lol

#

Yeah

#

I mean I kinda have to because one of the features I want to implement is translated signs

crisp citrus
#

why a sign specifically, if you don't mind me asking. Is this like a lobby plugin for bedwars?

onyx cradle
quartz ferry
crisp citrus
#

using dis

onyx cradle
crisp citrus
onyx cradle
#

yes but p is a player

#

and you're doing p.isEmpty() not pdc.isEmpty()

crisp citrus
#

god damn it

onyx cradle
#

idk how that even compiles because that isnt a player method

#

nvm yes it is

#

lol you're checking is someone is riding the player

crisp citrus
#

lmaooooo

#

welp

#

i cant bloody read

forest path
#

I'm trying to create a copy of a MapView, but I'm having trouble copying the area already explored. I tried adding the MapRenderer from the original, but it stops tracking the cursor - maybe because I destroy the original. Anyone know how to copy the area explored/revealed from one map to another?

quaint mantle
#

the opened furnace inventory has no functionality.

somber hull
#

I cannot use file.delete() even after the plugin is disabled

sour loom
#

isn't there any Enchantment.UNBREAKABLE or something like that? cause i don't seem to find it

#

oh ok

#

no, i wanted the one you gave me

#

thanks

candid silo
#

player.isOnGround is deprecated, is there another way for me to check or should I just keep using it

#

is it the type of thing where lag or hacked clients can abuse it

#

ah

#

imma keep using it unless theres a good way to check

#

imma research and come back

somber hull
#

How would i get the directory path of the "updates" folder?

#

and check if its null

sour loom
#

does ItemMeta.getDisplayName() return the items default name if its not set?

young knoll
#

No

candid silo
#

found a forum where it looks like md_5 removes the player method because when called on entities it uses the server's info but it's obviously the deprecation still there so idk

forest path
twilit vector
#

does PersistentDataContainer store data only on items?

#

i did not find a tutorial where some data is stored for a specific player

#

can you pls tell the syntax

sour loom
young knoll
#

Entity.getPersistantDataContainet

#

No idea why name returns

twilit vector
#

ah ok TYSM

young knoll
#

Probably similar to toString

twilit vector
#

okay

sour loom
young knoll
#

Iirc there is a getLocalizedName somewhere

#

ItemMeta maybe

sour loom
#

yea, its a part of item meta

twilit vector
young knoll
#

Just set a byte to 0 or 1

#

Or set it to anything and use has()

twilit vector
#

so how do i set it?

#

the statement

sour loom
#

does doing meta.addItemFlags(ItemFlag.HIDE_POTION_EFFECTS); for a chestplate hide potion effects on the player that is using it?

#

oh

young knoll
sour loom
#

is there a flag for player to hide its potion effects?

young knoll
#

No

#

But you can add the effect as hidden

#

Assuming you are managing the effects

sour loom
#

got it, thanks

twilit vector
#

would it be p.set(blah blaj blah) ?

#

p is the player

#

oh

#

so what would be the command?

twilit vector
twilit vector
#

ok

#

okay

#

thank youu!

young knoll
#

A furnace inventory needs a furnace to store the data and tick

#

Maybe you could fully reimplement the functionality yourself, but it’s probably not worth the effort

#

Alternatively you could attach the inventory to a furnace somewhere way out in the world

quaint mantle
#

how can I fully reimplement the functionality?

But, like vanilla furance

young knoll
#

You’ll need to tick the inventory to update the progress bar and all that

#

And validate the recipe in it, remove the input and set the output, remove the fuel, etc

quaint mantle
#

uhhh it would be pain

#

thanks you

twilit vector
#

if i need to get or set the persistent data in a player should i do:
p.getPersistentdata.... ?
P is the player

#

i am really confused

#

there are no tutorials for the same

#

i cant understand anything there

#

i know java

#

but i dont know how this works in spigot

#

if you dont want to help then ignore me dont keep saying spoon feed

#

okay

#

yea

#

so now do i need to store the players key or smtg in a variable?

#

and then use it when geting the value

#

?

#

oke

#

what?

#

umm not really

#

we use the get persistentdata method right?

#

yea

#

i got that

#

byte

#

or bool

#

anything works

#

okay

#

so byte

#

okay

#

so the key is what we got from getPersistentDataContainer

#

ah ok its a unique key

#

to differ from other data

#

right?

#

okay

pseudo rivet
#

i have a vps and want to make a bungeecord server can anybody help me by sending a video link

twilit vector
#

ohh ok

pseudo rivet
#

in dm

twilit vector
#

ohh ok

#

got it

#

Thank youuu sooo muchhh

#

yup byte also works

#

i will still check it out

#

Thank youuu

#

you the best

twilit vector
# pseudo rivet i have a vps and want to make a bungeecord server can anybody help me by sending...

How can you make a BungeeCord Minecraft server? Start your own Minecraft server with Bungeecord. Bungeecord will work for any version of 1.8 and 1.15. BungeeCord is a proxy server that lets you link multiple Minecraft servers together in order to create a network with many different games.

πŸ’Ž ...

β–Ά Play video
pseudo rivet
#

ok thanks

#

and how to set hub as spawn ...like you do /spawn and teleport to hub?

twilit vector
#

i am not sure

pseudo rivet
#

oh

#

you know how to teleport to hub from survival ?

twilit vector
#

nope

#

i am a beginner

pseudo rivet
#

oh

#

anyone else?

young knoll
#

I’m sure there are enough tutorials on the internet to sink a battleship

sour loom
#

isnt there ant Enchantment.SHARPNESS??

young knoll
#

DAMAGE_ALL

#

?jd

twilit vector
#

what is wrong in this?

young knoll
#

Key is not a string

twilit vector
#

oh

young knoll
#

Look at the javadocs and listen to your ide

twilit vector
#

ok

sage swift
#

knock knock

twilit vector
#

who is there

sage swift
#

your ide

twilit vector
#

my suffering is there

sage swift
#

listen up

twilit vector
#

yes

#

?

twilit vector
#

the doc says it is string namespace, string key

#

please

young knoll
#

The doc says what is a string namespace, string key

twilit vector
#

umm

#

can you just tell what it is

#

i cant find anything

#

now dont tell spoon feed

#

if you dont want to tell then ignore

#

ok so you dont want to tell

young knoll
#

It’s a namespace key

twilit vector
#

nvm ill ask someone

young knoll
#

The docs will say that in the set method

twilit vector
young knoll
#

?learnjava

undone axleBOT
sage swift
#

how do I lern javae @young knoll

twilit vector
#

dont ask him

#

he will get mad at you

#

dont risk it

#

delete the message

#

dont ping

#

aaahhh

chrome beacon
#

Lmao

twilit vector
#

great job πŸ™‚

twilit vector
sage swift
#

is 2025 when you will graduate middle school

twilit vector
#

who?

#

me?

young knoll
#

I hear code academy is great

#

Actually it’s probably fine, but still

granite stirrup
#

am i crazy i placed this all by hand

sour loom
#

how can i add auto-complete option to my command? should i do like usage: /<command> [option1, option2,...] ?

sour loom
#

❀️

granite stirrup
#

gtg

quartz ferry
#

my plugin wont show up im my server

#

Listener:

package org.gamingproduction.listeners.join;

import org.bukkit.Bukkit;
import org.gamingproduction.listeners.Main;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerJoinEvent;
import org.gamingproduction.listeners.utils.Utils;

public class JoinListener implements Listener {
    
    private Main plugin;
    
    public JoinListener(Main plugin) {
        this.plugin = plugin;
        
        Bukkit.getPluginManager().registerEvents(this, plugin);
    }
    
    @EventHandler
    public void onJoin(PlayerJoinEvent e) {
        Player p = e.getPlayer();
        
        if (!p.hasPlayedBefore()) {
            Bukkit.broadcastMessage(Utils.chat(plugin.getConfig().getString("firstjoin_message").replace("<player>", p.getName()).replace("<nickname>", p.getDisplayName())));
        } else {
            Bukkit.broadcastMessage(Utils.chat(plugin.getConfig().getString("join_message").replace("<player>", p.getName()).replace("<nickname>", p.getDisplayName())));
            
        }
         
    }
    
}
drowsy helm
#

like the whole plugin wont show up?

#

what does that have to do with the listener

onyx cradle
#

What is best practice for managing save files? How do I make sure that they stay in-sync with the rest of the server?

drowsy helm
#

save files for what?

#

player data?

onyx cradle
#

just kinda in general

#

stuff like land claims or factions

quartz ferry
#

fixed it, i compiled in wrong v

#

im probs dumb for this but if i make it so theres a string in the config and it can be true or false, how would i make an if statement to check if its true in my file?

onyx cradle
#

just use config.getBoolean()

silk mirage
#

hmm, imagine not doing this

config.yml

yessir: "true"
if(String.valueOf(Boolean.parseBoolean(config.getString("yessir")))== "true") sayHi();
reef wind
#

people need to read docs more..

quaint mantle
#

Hello someone can help me?
i am using SQLibrary and getting this error when i trying to connect the database
https://haste-bin.xyz/ciyofureye.java
someone know how to fix it please? thanks

silk mirage
#

... if u read that code

#

That is not called spoonfeeding

onyx cradle
#

to be clear do not use that code

quartz ferry
#

why not?

silk mirage
onyx cradle
#

i dont even think it would compile

silk mirage
#

:/

reef wind
#

Deleted it man saw it

silk mirage
#

but

#

its trash

#

dont use that, worth less

quartz ferry
#

if ("join_message_override" == true){

    }
#

like that

onyx cradle
#

you're comparing a boolean to a string, is that even legal?

silk mirage
#

you can just do if(config.getBoolean("path"))

silk mirage
onyx cradle
#

yeah but only after doing the compariso

silk mirage
#

WELP i was mistaken

silk mirage
quaint mantle
#

what is HikariCP

onyx cradle
#

all of it

quaint mantle
silk mirage
quaint mantle
silk mirage
#

error?

quaint mantle
#

i send error above

silk mirage
#

likely your database is not connected

#

OR is not working

quaint mantle
#

so how i need to do that?

onyx cradle
#

is your console saying you connected to db

#

well i suppose you must have to get the error

#

i think your library might just be outdated

#

yeah last update was 8 years ago

quaint mantle
#

so how i can fix that?

onyx cradle
#

use a different sql library

#

the one @silk mirage posted is fine

quaint mantle
#

HikariCP?

onyx cradle
#

yes

quaint mantle
#

it support MySQL?

onyx cradle
#

pretty sure it does

quaint mantle
#

ok thanks

tepid monolith
#

any idea why does this not work?

tepid monolith
dusk flicker
#

What API version are you building against

tepid monolith
#

server version: 1.8.8
api version: 1.12
jdk: 8

dusk flicker
#

theres your problem

tepid monolith
#

what's the replacement for it?

dusk flicker
#

you're using an api method that doesnt exist in 1.8 which is the sound

#

So use the 1.8.8 api

tepid monolith
#

how do i

#

get to have 1.8.8 api...

#

may you help me?

dusk flicker
#

What build system do you use, maven, gradle, etc?

tepid monolith
dusk flicker
#

then just change the api version in your pom

#

replace 1.12 with 1.8.8

#

should pull from the repo just fine

tepid monolith
#

hm you sure?

dusk flicker
#

yes

tepid monolith
tepid monolith
dusk flicker
#

it should end up as 1.8.8-R0.1-SNAPSHOT iirc

tepid monolith
#

iirc

#

what does that stand for

quiet ice
#

if I recall correctly

tepid monolith
#

LOL

#

im dumb

#

hm

dusk flicker
#

then refresh your maven

#

If you use intellij its the little maven button that pops up

tepid monolith
#

did

#

not sure if its like that

quiet ice
tepid monolith
#

thats what im using...

quiet ice
#

Do you have the repository set up?

tepid monolith
#

not sure if i do

quiet ice
#

Do you have a <repositories> block in your pom?

tepid monolith
#

should be this

quiet ice
#

looks good to me

wary harness
#

@tepid monolith did u use build tools

tepid monolith
quiet ice
#

Then it is likely an IDE issue; since it's IntelliJ I cannot help you

tepid monolith
#

i guess its doing something

quiet ice
#

If restarting your IDE/PC doesn't fix it and you have clicked on the refresh maven thingy, you might as well go back to notebook and code with tools that actually work when they are supposed to work

tepid monolith
#

thanks @quiet ice

#

just had to build it once

#

so it gets to download sources

#

and now it works

shy wolf
#

any one help?

#

e.getCurrentItem().getItemMeta().getDisplayName()

tame coral
#

The getCurrentItem() function might return a null value

clear galleon
#

You have to account for when they click nothing

tame coral
#

You need to check if it's null before getItemMeta

shy wolf
#

ok

quiet ice
#

well, it is clicking outside of bounds

keen kelp
#

How do I set health for an entity

tame coral
keen kelp
#

emmm

quartz ferry
#

can someone hop on my serv and test a leave msg cuz its 5:20AM and none my friends are up

tame coral
keen kelp
#

Wait aren't all entities Damagable?

tame coral
#

No

keen kelp
#

bruhh

tame coral
#

Enderpearls aren't, items aren't

keen kelp
#

Oh right...

tame coral
#

etc

keen kelp
#

Imma just cast it to zombie then

tame coral
#

What

keen kelp
#

Zombie e = (Zombie) player.getWorld().spawnEntity(player.getLocation(), EntityType.ZOMBIE);

#

It's safe right

tame coral
#

Oh yeah

keen kelp
#

Yeah

tame coral
#

If you spawn a zombie then it's fine

keen kelp
#

Im not dumb enough to do unchecked cast :p

tame coral
#

But you can't cast zombie to another entity for example

#

Yeah

#

lmao

keen kelp
#

or am I

quiet ice
#

I think you can do Zombie.class, but idk

gritty urchin
#

How to hide an entity from a specific player with packets?

keen kelp
#

Oh boy

#

Here's the sauce for an damage indicator mod

#

This is the class used to hide the armorstand from other players if that's desired

#

Go wild

#

iirc it uses protocolLib but I think TinyProtocol works too

#

And if not you can always do it youself

tame coral
#

Or just spawn it with packets and cancel the event for specific players

gritty urchin
#

These entities are not manually spawned in though, I want them to only be hidden when a player loads the chunk they are in.

tame coral
#

Then do the first option

#

The server will send entity metadata when the player loads the chunk the entity is in

gritty urchin
#

Is this with NMS or ProtocolLib?

tame coral
#

ProtocolLib

gritty urchin
#

Ok

opal juniper
#

There is a destroy entity packet

#

Clientbound

tame coral
#

Might help indeed

#

Send it when the entity metadata is sent i guess ?

opal juniper
#

Wait why

tame coral
#

I don't see any other moment, is there one ?

opal juniper
#

I mean

#

There is the entitySpawnPacket

#

Or something like that

tame coral
#

Oh

#

Yeah probably

#

Just cancel this one

opal juniper
#

Spawnentityliving or something

#

I forget how I did it

#

For the one chunk render distance

#

What are you trying to do @gritty urchin

#

As in the final goal

gritty urchin
#

Hide everything in a chunk for specific players.

opal juniper
#

Right ok

gritty urchin
#

Entities, players, sounds etc

opal juniper
#

Hmm

#

There is a lot more to block than you think

#

Cause you have to listen for when entities move across borders, and back again

#

Also

gritty urchin
#

Yeah

opal juniper
#

Particles and shit still get thru

#

And god knows about sound

gritty urchin
#

So how would I hide entities firstly?

tame coral
#

Cancel the spawn event

gritty urchin
#

Yeah but won't that completely remove them?

tame coral
#

Only clientside

#

That's what you want isn't it ?

gritty urchin
#

Yeah but for only some players

#

Some players should be able to see the entities

tame coral
#

That's the whole point of packets

#

Check the player's username or uuid or whatever

#

And cancel the event only for some of them

gritty urchin
#

#EntitySpawnEvent?

#

Are you sure that's clientside?

tame coral
#

Clientbound

opal juniper
#

Yeah just set up a packet adapter for the client packet for spawning

tame coral
#

^

opal juniper
#

You can then get the target player

#

And then the target entity x,y,z

#

Actually, just do a binary shift on the x & z to get the chunk x&z and check to see if that player needs them blocked

#

If so, cancel the event

regal carbon
#

Sorry for a dumb question but is there a method to change server.properties?

quaint mantle
#

Hello someone can help me?
i am using HikariCP and getting this error when i trying to connect the database
https://haste-bin.xyz/zezabigelu.java
someone know how to fix it please? thanks

opal juniper
#

Afaik there is no way to reload the minecraft config

#

However theoretically you could open it just like any other file and write to it

tame coral
gritty urchin
#

Can't seem to find a clientside packet for spawning

eternal oxide
#

If you are on current spigot use the libraries feature in the plugin.yml

quaint mantle
#

i am using paper

eternal oxide
#

Then you are asking in the wrong discord

quaint mantle
#

paper has discord?

reef wind
#

yes

eternal night
#

paper also has the library feature xD

#

concerning it is a spigot downstream

opal juniper
opal juniper
waxen plaza
#

I made a custom mob ( zombie ) is it possible to make this zombie naturally spawn instead of the vanilla one?

burnt current
#

Hey Quick question: Does anyone know how exactly I can program a listener that sets blocks around a certain item when I set it?

eternal oxide
#

What blocks are you wanting to place around what?

rapid whale
#

I can't comment on Jira, is there something I need to do before I can comment on it

burnt current
# eternal oxide What blocks are you wanting to place around what?

I would like to set a banner with a PersistentdataContainer, but this should then be deleted directly from the inventory and also removed from the place where it was set. and then I would like to build a house around the block. For this I would need different blocks

eternal oxide
#

Not a simple task then. You need to think about schematics

#

You are literally describing a whole plugin

burnt current
#

isn't it possible to simply calculate where which blocks have to be placed and then place them at these coordinates?

#

Well, I haven't done anything like that yet, but that's one idea I have.

eternal oxide
#

Yes, but you have to have the whole design/schematic with block types, rotations/facings.

burnt current
#

Whew ok. How can you do that? Are there any tutorials for this?

eternal oxide
#

There is unlikely to be any tutorial other than somethign using the WorldEdit API

burnt current
#

ok that's bad

#

how do I get the Worldedit API?

eternal oxide
#

Google worldedit, its a plugin. But good luck with the API its a nightmare to use.

spiral dome
#

i couldn't sleep for the next 3 days of reading the usage docs PensiveCowboy

muted idol
#

hey there so with this code im trying to register a new jsonobj for each checkpoint. but for some reason when i run it once it registers 1 obj as it should but then once i run it twice i would like it to add another json obj for the other checkpoint but now it just updates the first json obj to the new checkpoint info. could anybody help me with this, i am not getting any stacktrace
code: https://pastebin.com/kind07D2

burnt current
#

You scare me ._.

#

is it really not possible to do that in a different way? πŸ˜…

muted idol
#

im pretty new to JSON

burnt current
#

oh no sorry

muted idol
#

np

deft raft
#

Hey, I'm trying to make a program that runs the command /say hello after startup. I' not sure why this doesn't work. Can anyone help me? The code is: https://hastebin.com/napetifivo.java

wary harness
#

is there a way to load custom head

#

skin from specific link

#

or file from harddrive ?

gritty urchin
eternal night
#

entity.getLocation().getX() would return the x coordinate

gritty urchin
#

This is with PacketType.Play.Server.SPAWN_ENTITY_LIVING ProtocolLib packet

summer scroll
#

Can you disable spectator mode teleporting using the hotbar?

drowsy helm
#

Yeah it calls teleport event when used

#

Just cancel the event

#

If gamemode is spectator

summer scroll
#

Alright, thanks for that.

burnt current
#

which event do you need to make a listener that asks whether a certain block has been set? and how do you then ask whether the block has a certain persistent data container? And is it then possible to get the location of the set block and then use it to set blocks?

tacit drift
rigid hazel
#

Is there a way to program, that I can create a world border, that is permeable for players, but visible?

tacit drift
#

i don't think that you can make the wb permeable

#

you can try to make a particle border

#

but i think that it would consune a ton of resources

rigid hazel
#

Yes. Understandable

#

Other ways to mark the borders of an region?

maiden briar
#

I don't know if this is a bug, but if I click a item in a inventory the InventoryClickEvent gets called twice, and if I click another item again it stops getting called. Only the item I click at the FIRST time works good

hybrid spoke
maiden briar
#

Static things are always available with <Class>.method/field, instances must be created with new <class>()

hybrid spoke
#

not really. a static method belongs to the class itself where a non-static method belongs to each object of that type

rigid hazel
#

Error:

#
java.lang.NullPointerException: null
        at de.cimeyclust.Plugin.onLoad(Plugin.java:48) ~[?:?]
        at org.bukkit.craftbukkit.v1_16_R3.CraftServer.loadPlugins(CraftServer.java:399) ~[patched_1.16.5.jar:git-Paper-727]
        at net.minecraft.server.v1_16_R3.DedicatedServer.init(DedicatedServer.java:269) ~[patched_1.16.5.jar:git-Paper-727]
        at net.minecraft.server.v1_16_R3.MinecraftServer.w(MinecraftServer.java:1068) ~[patched_1.16.5.jar:git-Paper-727]
        at net.minecraft.server.v1_16_R3.MinecraftServer.lambda$a$0(MinecraftServer.java:290) ~[patched_1.16.5.jar:git-Paper-727]
        at java.lang.Thread.run(Thread.java:834) [?:?]```
#

Code:

#
@Override
    public void onLoad()
    {
        this.getLogger().info("Plugin loads...");

        // Check connection to database
        this.getLogger().info("Check if connection to database is valid...");
        this.connector = new MySQLConnector(this);
        if(this.connector.isConnected())
        {
            this.getLogger().info("Β§aPlugin connected to DB successfully.");
        }
        else
        {
            this.getLogger().warning("Plugin couldn't connect to DB! Plugin get disabled!");
            this.getServer().getPluginManager().disablePlugin(this);
        }

        // Loading Player Data
        this.getLogger().info("Loading player data...");
        List<OfflinePlayer> players = new ArrayList<>();
        for(String playerUUID : this.connector.getColumns("general", "uuid"))
        {
            players.add(this.getServer().getOfflinePlayer(playerUUID));
        }
        this.allRolePlayers = players;
        this.onlineRolePlayers = new ArrayList<>();

        // Finished Loading
        this.getLogger().info("Plugin loaded successfully!");
    }
earnest lark
#

/paste

#

?paste

undone axleBOT
earnest lark
#

use this

#

easier to read

rigid hazel
maiden briar
#

There is no line 48

hybrid spoke
#

whats on line 48

rigid hazel
#

Why I get this error? this.connector is not null. I debugged

#

Oh. sorry

#

"for(String playerUUID : this.connector.getColumns("general", "uuid"))"

#

That's line 48

maiden briar
#

Then getColumns returns null

hybrid spoke
#

^^

rigid hazel
#

Okay. That could it be.

#

I will try something.

#

πŸ™‚

#

Thanks. Got the error

earnest lark
#

if i put sender in a sendmessage will it just say who executed the command?

rigid hazel
#

No. It sends the message FROM the sender

hybrid spoke
#

sender#getName will return you the name

rigid hazel
#

I think

hybrid spoke
#

if there is a getName

earnest lark
#

sender.getName()
this

hybrid spoke
#

yeah

earnest lark
#

so target.sendMessage("you have ben healed by " + sender.getName());this will work

hybrid spoke
#

sender.sendMessage("your name is: " + sender.getName());

earnest lark
#

yea ok

earnest lark
#

that is my new fvorite video

burnt current
#

which event do you need to make a listener that asks whether a certain block has been set? and how do you then ask whether the block has a certain persistent data container? And is it then possible to get the location of the set block and then use it to set blocks?

earnest lark
#

is there a block break event?

#

i think there is right

hybrid spoke
#

no you just can't break blocks at all

#

ofc. there is

earnest lark
#

yea ok

soft dragon
#

Ok guys, so im upgrading plugin and there is function called Inventory.getName

#

its showing ERROR

waxen plaza
#

zombie.setHealth(20); How do I set health bigger then 20? I get error if it's >20

hybrid spoke
hybrid spoke
earnest lark
#

my plugin is going to be a heal/feed command and i want to do somthing like /do feed adeptvail or /do heal adeptvail but i need to know how to add the command so you heal/feed other people and i dont know if i should do args.length == 1 or args.length == 2

#

?paste

undone axleBOT
waxen plaza
#

setMaxHealth is deprecated, should I worry?

hybrid spoke
earnest lark
waxen plaza
earnest lark
#

there is my code so far

soft dragon
#

event.getInventory().getName().equals(name) - getName doesnt exist, please help me

hybrid spoke
# earnest lark https://paste.md-5.net/eneletipaw.java

check if the args length is 0 or < 1. otherwise /heal asjd ljkashd kashdkjawh kjash will heal yourself
check if target is null. otherwise there is a possibility of a NPE if the target is not online
instead of returning true you could just use else if
and why do you have 2 commands in 1 executor

burnt current
hybrid spoke
earnest lark
#

i was goijng to ask if i could have two commands in one exicuter or i should just make a new class for it

hybrid spoke
earnest lark
#

yea thats what i was thinking

#

i was trying to make it all one place

#

but i dont like spaggetti

#

so

burnt current
hybrid spoke
azure crow
#

hello i have this error:

[16:00:22 ERROR]: Could not pass event PlayerMoveEvent to UltimateClaims v1.7.2 org.bukkit.event.EventException at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:310) ~[server.jar:git-Spigot-d2856ae-8f0f4ed] at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) ~[server.jar:git-Spigot-d2856ae-8f0f4ed] at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:502) [server.jar:git-Spigot-d2856ae-8f0f4ed] at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:487) [server.jar:git-Spigot-d2856ae-8f0f4ed] at net.minecraft.server.v1_8_R3.PlayerConnection.a(PlayerConnection.java:269) [server.jar:git-Spigot-d2856ae-8f0f4ed] at net.minecraft.server.v1_8_R3.PacketPlayInFlying.a(SourceFile:126) [server.jar:git-Spigot-d2856ae-8f0f4ed] at net.minecraft.server.v1_8_R3.PacketPlayInFlying$PacketPlayInPosition.a(SourceFile:57) [server.jar:git-Spigot-d2856ae-8f0f4ed] at net.minecraft.server.v1_8_R3.PlayerConnectionUtils$1.run(SourceFile:13) [server.jar:git-Spigot-d2856ae-8f0f4ed] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_292] at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_292] at net.minecraft.server.v1_8_R3.SystemUtils.a(SystemUtils.java:19) [server.jar:git-Spigot-d2856ae-8f0f4ed] at net.minecraft.server.v1_8_R3.MinecraftServer.B(MinecraftServer.java:718) [server.jar:git-Spigot-d2856ae-8f0f4ed] at net.minecraft.server.v1_8_R3.DedicatedServer.B(DedicatedServer.java:367) [server.jar:git-Spigot-d2856ae-8f0f4ed] at net.minecraft.server.v1_8_R3.MinecraftServer.A(MinecraftServer.java:657) [server.jar:git-Spigot-d2856ae-8f0f4ed] at net.minecraft.server.v1_8_R3.MinecraftServer.run(MinecraftServer.java:560) [server.jar:git-Spigot-d2856ae-8f0f4ed] at java.lang.Thread.run(Thread.java:748) [?:1.8.0_292] Caused by: java.lang.NoSuchMethodError: org.bukkit.entity.Player.sendTitle(Ljava/lang/String;Ljava/lang/String;)V at com.songoda.ultimateclaims.core.locale.Message.sendTitle(Message.java:84) ~[?:?] at com.songoda.ultimateclaims.listeners.EntityListeners.playerMove(EntityListeners.java:296) ~[?:?] at com.songoda.ultimateclaims.listeners.EntityListeners.onMove(EntityListeners.java:62) ~[?:?] at sun.reflect.GeneratedMethodAccessor431.invoke(Unknown Source) ~[?:?] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_292] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_292] at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:306) ~[server.jar:git-Spigot-d2856ae-8f0f4ed]

hybrid spoke
#

?paste

undone axleBOT
earnest lark
#

and i will do the <1 or 0

grave kite
#

Hi, how to get player instance from a InventoryClickEvent?

hybrid spoke
azure crow
#

help me pls

hybrid spoke
earnest lark
#

yea but it is a subcommand so i can keep it at 1

soft dragon
#

event.getInventory().getName().equals(name) - getName doesnt exist, please help me (im using version 1.17.1)

hybrid spoke
# azure crow help me pls

you are trying to access a method you don't have. probably using a higher API than the one on the server

hybrid spoke
soft dragon
#

for first time im using inventory functions

hybrid spoke
#

you should understand that, mr gamedev

grave kite
azure crow
#

how to fix it?

hybrid spoke
hybrid spoke
#

or not using a method that does not exist on the api version on the server

azure crow
#

which api?

hybrid spoke
# azure crow which api?

you are using the api of spigot to code your plugin. the version of that api is probably higher than the spigot version of your server

grave kite
# hybrid spoke so cast it

Can't it have unexpected behavior? If it's not a player instance that means it can be something else as well

hybrid spoke
hybrid spoke
azure crow
#

how can i change it

earnest lark
#

wait no 1=> right

#

wait

#

oh no im confusing myself

hybrid spoke
grave kite
burnt current
hybrid spoke
burnt current
#

no

hybrid spoke
#

World has a #getBlockAt(Location) method which returns the block at the given location. just set the type of that block to what you need

quaint mantle
#

how would i run a MySQL in my server, on Windows (version 11, if thats important)?

soft dragon
hybrid spoke
waxen plaza
#

Is there any nms documentation?

hybrid spoke
waxen plaza
#

oh ok

burnt current
hybrid spoke
burnt current
#

oh ... does air also count as a block in this case?

hybrid spoke
#

yes

azure crow
#

how to change my api

gritty urchin
#

How would I get entity metadata packet position protocol lib

burnt current
# hybrid spoke yes

is it possible to pass the location of the blocks to be changed via the same method as in my example?

maiden briar
#
@EventHandler(priority = EventPriority.HIGHEST)
    public void onBukkitInventoryClick(InventoryClickEvent e)
    {
        if(inventoryEquals(e.getView().getTitle()) && e.getWhoClicked().getName().equals(this.player.getName()))
        {
            System.out.println("Bukkit inv click");
            Bukkit.getScheduler().scheduleSyncDelayedTask((Plugin) TvheeAPIPlugin.getPlugin(), () -> onInventoryClick(e));
        }
    }

Looks like normal? The only problem is that onInventoryClick(e) gets called twice, but I see "Bukkit inv click" only once in the console

#

Oh I see, annotated the method also with @EventHandler so that was the clue

soft dragon
maiden briar
#

Did I just solve your problem with this code?

soft dragon
#

yes XD

maiden briar
#

Nice

umbral pagoda
#

@quiet ice

eternal night
#

it isn't

#

lore does not have an item flag to be hidden afaik

umbral pagoda
#

hi

#

ineed to add potions in my redpvp shop

opal juniper
#

Does Player#getEyePosition reflect f5 view?

umbral pagoda
#

how ican add it ?

opal juniper
#

Or does it just apply an offset

eternal night
#

offset + pose are respected

azure crow
#

Hello, when a player connects to my server I have this error in the console what should I do?

umbral pagoda
#

how ican add the code

azure crow
#

`Could not pass event PlayerChangedWorldEvent to AParkour v3.5.5
org.bukkit.event.EventException
at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:310) ~[server.jar:git-Spigot-d2856ae-8f0f4ed]
at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) ~[server.jar:git-Spigot-d2856ae-8f0f4ed]
at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:502) [server.jar:git-Spigot-d2856ae-8f0f4ed]
at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:487) [server.jar:git-Spigot-d2856ae-8f0f4ed]
at net.minecraft.server.v1_8_R3.PlayerList.moveToWorld(PlayerList.java:623) [server.jar:git-Spigot-d2856ae-8f0f4ed]
at org.bukkit.craftbukkit.v1_8_R3.entity.CraftPlayer.teleport(CraftPlayer.java:476) [server.jar:git-Spigot-d2856ae-8f0f4ed]
at org.bukkit.craftbukkit.v1_8_R3.entity.CraftEntity.teleport(CraftEntity.java:223) [server.jar:git-Spigot-d2856ae-8f0f4ed]
at me.retro.Inicio.onJoin(Inicio.java:130) [Spawn.jar:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_292]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_292]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_292]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_292]
at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:306) [server.jar:git-Spigot-d2856ae-8f0f4ed]
at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) [server.jar:git-Spigot-d2856ae-8f0f4ed]
at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:502) [server.jar:git-Spigot-d2856ae-8f0f4ed]
at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:487) [server.jar:git-Spigot-d2856ae-8f0f4ed]
at net.minecraft.server.v1_8_R3.PlayerList.onPlayerJoin(PlayerList.java:296) [server.jar:git-Spigot-d2856ae-8f0f4ed]
at net.minecraft.server.v1_8_R3.PlayerList.a(PlayerList.java:156) [server.jar:git-Spigot-d2856ae-8f0f4ed]
at net.minecraft.server.v1_8_R3.LoginListener.b(LoginListener.java:144) [server.jar:git-Spigot-d2856ae-8f0f4ed]
at net.minecraft.server.v1_8_R3.LoginListener.c(LoginListener.java:54) [server.jar:git-Spigot-d2856ae-8f0f4ed]
at net.minecraft.server.v1_8_R3.NetworkManager.a(NetworkManager.java:231) [server.jar:git-Spigot-d2856ae-8f0f4ed]
at net.minecraft.server.v1_8_R3.ServerConnection.c(ServerConnection.java:148) [server.jar:git-Spigot-d2856ae-8f0f4ed]
at net.minecraft.server.v1_8_R3.MinecraftServer.B(MinecraftServer.java:817) [server.jar:git-Spigot-d2856ae-8f0f4ed]
at net.minecraft.server.v1_8_R3.DedicatedServer.B(DedicatedServer.java:367) [server.jar:git-Spigot-d2856ae-8f0f4ed]
at net.minecraft.server.v1_8_R3.MinecraftServer.A(MinecraftServer.java:657) [server.jar:git-Spigot-d2856ae-8f0f4ed]
at net.minecraft.server.v1_8_R3.MinecraftServer.run(MinecraftServer.java:560) [server.jar:git-Spigot-d2856ae-8f0f4ed]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_292]
Caused by: java.lang.NullPointerException
at me.davidml16.aparkour.managers.StatsHologramManager.haveParkourData(StatsHologramManager.java:92) ~[?:?]

#

help me pls

eternal night
#

fix your aparkour plugin

azure crow
#

how to?

opal juniper
eternal night
#

if you aren't the developer of it

#

report it as a bug

#

yea

azure crow
#

oh ok thx

eternal night
#

pose is sneaking swimming etc

opal juniper
#

Ok thanks

waxen plaza
#

How do I set an entity held item?

#

nvm

left lodge
#

LivingEntity.getEquipment().setItemInMainHand

sly bison
#

Hey why is setLine() and getLine() in SignChangeEvent depreciated

hybrid spoke
#

?jd

quaint mantle
#

hey there

#

I cannot find protocol documentation for 1.17.1, I guess it's not released yet?

twilit vector
#

Is there a way to get players in a 3 * 3 area near a certain player and then check if any of the nearby players have a value in their PersistentDataContainer ?

#

i would be able to manage the 2nd part

#

but im not sure how i will get the players in a radius of 3 blocks of him

muted idol
#

hey there so with this code im trying to register a new jsonobj for each checkpoint. but for some reason when i run it once it registers 1 obj as it should but then once i run it twice i would like it to add another json obj for the other checkpoint but now it just updates the first json obj to the new checkpoint info. could anybody help me with this, i am not getting any stacktrace
code: https://pastebin.com/kind07D2