#help-development

1 messages ยท Page 1924 of 1

dense heath
#

Solves a lot of other issues, though ;)

sullen dome
#

templeos better change my mind

dense heath
lethal coral
#

send your main class too

sullen dome
#

oh god, i'm out

#

bye bye

dense heath
lethal coral
#

in your main class why are you implementing listener with no listeners

naive bolt
#

idk i think copilot did it

#

i removed them and it still doesnt work

lethal coral
#

this shouldn't matter but here's how I do it:

ProxyServer.getInstance().getPluginManager().registerCommand(this, new PingCommand());
naive bolt
#

nope

#

nope the plugin enables fine

lethal coral
#

do you happen to know anything about bungeecord scoreboards

#

great

#

because nobody else does either

#

because I've scowered the entire internet and have found nothing about the actual api and how to use it

vocal cloud
#

Bungee has scoreboards?

lethal coral
#

because I've attempted to use it, the data changed, but no scoreboard showed

#

display a scoreboard to a player

naive bolt
#

the command doesnt even exist

lethal coral
#

so I can easily get bungee-related stuff

naive bolt
#

WAIT

#

no im stupid af

#

i was doing /ping but my command is /link

lethal coral
#

and every information bit I need to pass is just in my proxy plugin

naive bolt
#

hahha

lethal coral
#

๐Ÿ˜†

#

yeah and their rank is stored on the proxy

#

so it would make no sense to create an entirely different plugin just for that server and transfer data over there to create a bukkit scoreboard when bungeecord has the api for it

final monolith
final monolith
#

lol

naive bolt
#

now i need to try add mysql

#

fun

lethal coral
#

because there's literally no reason to when bungeecord has the api

#

and I've been told it's "perfectly good"

#

.

#

I've followed it though, it just won't show the scoreboard ๐ŸšŽ

#

the data appears to update

#

let me send me code

#
            ProxiedPlayer player = (ProxiedPlayer) commandSender;
            Scoreboard scoreboard = player.getScoreboard();
            scoreboard.setName("testboard");
            scoreboard.setPosition(Position.SIDEBAR);
            scoreboard.addObjective(new Objective("testboard", "Objective!", "integer"));
            scoreboard.addScore(new Score("this is a test!", "uniquescore", 1));
            Util.log(player.getScoreboard().toString());
random gust
#

@lethal coralim trying the same ๐Ÿ˜„

lethal coral
lethal coral
random gust
lethal coral
#

No

random gust
#

Has anyone an idea, why the player doesn't get the prefix?

        ProxiedPlayer proxiedPlayer = event.getPlayer();
        Scoreboard scoreboard = proxiedPlayer.getScoreboard();
        Team team = new Team("owner");
        team.setPrefix("owner ");
        team.setDisplayName("prefix");
        team.addPlayer(proxiedPlayer.getName());
        scoreboard.addTeam(team);
        proxiedPlayer.sendMessage("add prefix");
lethal coral
#

I have been yelled at not to do that

#

and when I tried it gave a json error

young knoll
#

You could force them to respawn

kind coral
#

how can i make a crafting where i don't loose an item like i have a book that i need for the crafting but i don't want to lose the book when i craft

#

i want to use it unlimited times

quaint mantle
#
ItemStack glass = new ItemStack(Material.LIGHT_GRAY_STAINED_GLASS_PANE);
        ItemMeta glassMeta = glass.getItemMeta();
        glassMeta.setDisplayName(" ");
        glassMeta.addItemFlags(ItemFlag.HIDE_ENCHANTS);
        glassMeta.addEnchant(Enchantment.DURABILITY, 1, true);
        glass.setItemMeta(glassMeta);```
This isn't giving me any enchanted glass panes.
young knoll
#

Some items just don't glow

#

Remove the hide flags and ensure it actually has the enchantment

tardy delta
#

try to set it before the hide enchants

#

should i give custom objects in database an identifier in the class so i can identify it based on that one field instead of multipe fields?

My problem: having a map with homes as value, the key should be the name and the uuid of the owner, should i just give the homes an apart unique id?

spiral light
#

isnt the home name the unqiue id ?

grim ice
#

?paste

undone axleBOT
grim ice
#

tf

spiral light
#

xD

tardy delta
#

No because different owners could have homes with the same name

grim ice
#

help please lmao'

tardy delta
#

Gonna take a nap now

spiral light
lethal coral
#

anybody happen to be a pristine expert on bungeecord scoreboards

tardy delta
#

So like in java a map<map<uuid,string>, home>

young knoll
#

Ahhh

#

Use a table :p

grim ice
#

or make ur own class

#

hellp

lethal coral
quaint mantle
young knoll
#

You used to be able to do it with NMS

quaint mantle
#

wait so that is an option?

#

i thought mc only have that from version 1.15 or above lol

young knoll
#

The gamerule sure

hasty prawn
#

I feel like I definitely did it before 1.15

woeful crescent
#

I know this sounds simple, but how would I draw a line from one location to another with a vector?

hasty prawn
#

There's no SQL field in your plugin class.

woeful crescent
chrome beacon
#

Still no SQL field

hasty prawn
#

^

naive bolt
#

how do i give it, it

hasty prawn
#

I assume DiscordSync is your class extending JavaPlugin

#

Needs to have a SQL field in there

hasty prawn
# woeful crescent bunp

No vector required really, just step through (so number of particles that you want) and add x,y,z components from 1 location to the other and render the line on each step.

woeful crescent
#

step through how

#

is pretty much what i was askin

grim ice
#

@naive bolt what error r u getting btw

chrome beacon
#

Extend JavaPlugin. Also make sure your plugin variable is set to your main class type

#

@grim ice

grim ice
#

ah

#

btw

#

im having this problem with databases

#

connection = DriverManager.getConnection("jdbc:mysql://" + host + ":" + port + "/" + database
+ "?useSSL=false", username, password);

#

this is how I do it

young knoll
chrome beacon
naive bolt
#

i think its because i used Main in the file not DiscordSync

hasty prawn
#

Yeah

naive bolt
#

thats what i get for following videos

chrome beacon
grim ice
#

@naive bolt how do u not get errors btw

naive bolt
#

im not running the code

grim ice
#

im following the same tutorial as u

#

i got this error

naive bolt
#

i just use intelij Problems tab

grim ice
#

lol

sullen dome
#

you may want to use a logger to print out that message

chrome beacon
sullen dome
#

if you dont want spigot to sometimes print out annoying messages

naive bolt
#

how do i do sql in a command file

naive bolt
#

so /link does some sql

hasty prawn
grim ice
#

:(

hasty prawn
#

:(

young knoll
#

:(

quaint mantle
#

๐Ÿ˜ฆ

#

noooooo

naive bolt
#

i like this server because people are the same as me trying to learn java

grim ice
#

brooo

#

it says that my ip:port is already in use

quaint mantle
#

no, it is because people here shared the same braincell lol

grim ice
#

wtf he saying bro

naive bolt
#

in the discord js discord they just say โ€œlearn javascriptโ€ and donโ€™t help

quaint mantle
#

actually

#

?learnjava :pepeCringe:

undone axleBOT
grim ice
#

@naive bolt dw this server does it too

naive bolt
#

no no no ๐Ÿ˜ถ

sterile token
#

Yeah I like that. But i dont like when people ask for support when they atleast dont know the Basic concept of Java

grim ice
#

the server became soft nowadays

#

before it used to be harsh on beginners ig

hasty prawn
#

It just depends on what they're asking.

quaint mantle
naive bolt
#

imma go lay in bed and watch java videos

grim ice
#

wheres elgarL tho

#

is he still here

sterile token
#

I have a question im doing a protection plugin. I need recommendations how i can calculate the protection?

grim ice
#

oh pog hes still talking here

sterile token
#

Thanks

naive bolt
#

use chunks

sterile token
#

Really?

#

Cuz they told that if possible me say the round

#

Like I have the protection and it protect 20 blocks around the protection block

young knoll
#

I think the easiest way is to just have 2 corners

grim ice
#

is there a way to get free database hosting

#

i cant host it correctly on my device

sterile token
#

Is there any tutorial?

#

But would that work?

#

Cuz I need to protect block on every side, top and under that block

#

Let say you the protection on coord 0 100 0

#

But i think you get the idea

#

So i will the block and 2 corners right?

grim ice
#

h

#

how

sterile token
#

Allright

#

I will need many events?

#

I thought doing it with BlockPlaceEvent

#

Or smth like that it was called

#

Is there an event

#

For knowing if you are near a block?

#

Oh that not my version

#

hahaha

#

I will check it on the version im using

#

ut thanks for help

#

Really helpfull i never worked with coordinates and blocks before

lethal coral
#

Hello. I'm wondering if there's an easy way to transfer yml data from a bungeecord proxy server to a connected server. If possible, I'd like to transfer the entire yml file.

#

How can I convert the yml file's contents to a bytearray?

young knoll
#

Turn it into a string and then get the byte array from that

lethal coral
#

I'm starting to think that it may just be a better option to make a database

#

this is seemingly overkill since I could just use the bungeecord scoreboard api if there was any information on it or examples

mortal hare
#

Oh yea mr krabs

#

I wasted 2 hours trying to optimize my code by removing useless bukkit runnable

#

to realize that I need runnable in order for my code to function properly

#

because InventoryDragEvent doesnt support changing cursor

#

when the event is cancelled

#

while it supports setting the items in the inventoryView slots tho

#

Any modifications to slots that are modified by the results of this InventoryDragEvent will be overwritten. To change these slots, this event should be cancelled and the changes applied.

#

changing the inventory itemstacks inside slots works

#

but changing the cursor

#

not...

sly trout
#

how to do PlayerWalkEvent

#

?

hasty prawn
#

PlayerMoveEvent

sly trout
#

cuz PlayerMoveEvent triggers even if you just move ur cam

mortal hare
#

just ignore the pitch and yaw

hasty prawn
#

^

sterile token
#

Opinions?

sly trout
#

?

young knoll
#

Check if the xyz are the same

#

If they are, ignore it

sly trout
#

okay

#

thank you

sterile token
sterile token
hasty prawn
#

And how do you change the lines

sterile token
#

And them you can just return on getLines() your Config#getStringList("Scoreboard.Lines")

hasty prawn
#

Ah, okay

sterile token
#

Let say you create the provider for the scoreboard yourself

#

I only provide you the method getTitle and getLines

#

My intention its to create an all in one library

#

With the most used things for doing plugins

#

Scoreboard api, Menu api, Item builder, cooldown api, Filehandler, etc

hasty prawn
#

Well I'll tell you right now it's difficult to do lol

sterile token
#

A small spoiler

hasty prawn
#

It's harder than you would think. Trying to make things as generic as possible while still being powerful enough to be useful can be challenging.

sterile token
#

All that its what it contains up to know

#

I have been working really hard on it

hasty prawn
#

^ yes

#

If it's the same difficulty as just making the same thing in Spigot API your API is worthless

sterile token
#

Yeah for example i think a lot what constructor to put, the methods name, the order of how yoo will use it

lethal coral
#

you know what's also hard?

#

apparently the bungeecord scoreboard api

#

๐ŸšŽ

young knoll
#

You know what else is hard

#

Bedrock

wary harness
#

how to check if player went out side view distance

hasty prawn
#

And if you're making an API you get to go through the joys of documentation! PeepoHappy

sterile token
wary harness
#

does server sends packet to destroy that entity

sterile token
#

Wait bedrock plugins are created how?

#

I never could find info about doing plugins

hasty prawn
#

Coll meant actual bedrock lol

#

Not the version

sterile token
#

He?

hasty prawn
wary harness
#

when server sends it

sterile token
#

The most hard thing ever find its Netty

#

Lmao you dont know the pains im having right now

#

๐Ÿ˜•

wary harness
#

well u can set up rended distance

hasty prawn
wary harness
#

in spigot.yml

#

for players

#

so there should be

hasty prawn
#

What version are you using Axe

wary harness
#

1.16

#

then up

#

I will need it for 1.17

hasty prawn
# wary harness I will need it for 1.17

Well if you were using 1.18 I have an API that can fire events for packets for you but I've not tested it in 1.16 or 1.17. You'd probably have to make some changes.

#

Otherwise... ProtocolLib or injecting is how you'd do it

sterile token
#

Do you have the problem, that you start a project really motivated and work really hard on it. And then you get bored, and then work some hours and work on other projects. Or im alone with this?

hasty prawn
#

I think everyone does that tbh

lethal coral
sterile token
#
List<?> getSomething();
#

Lmao i didnt know you can do that

wary harness
#

I will try it out

forest edge
#

Has anyone got experience with sending fake player packets to players in order to make the name of the fake player appear when tab completing? I'm wondering which packets I need to use, whether it be SpawnPlayer or SpawnEntity?

wary harness
hasty prawn
#

Yeah, and the core, current gradle config is bugged and won't install dependencies properly Madge

#

Maven is too verbose for me

#

oh ok

sterile token
#

Maven its the best thing i could evenr find beside the Gradle yet

#

(Every not typed language == yet) || (Java && C#) == Good languages

#

Kotlin, JavaScript, C++, C, TypeScript (Not typed languages) == shit

twilit wharf
#

I am attempting to develop a massive network, with a multitude of super complicated features. How practical would it be to make my own fork of Spigot, and make everything in the server jar, having everything directly edited, without a plug-in?

young knoll
#

Means youโ€™d have to patch a bunch of stuff

#

I donโ€™t think hypixel even uses that approach

hasty prawn
#

They definitely use a fork that they've developed but they also use plugins.

sterile token
#

I think that Hipixel, only have a custom global core sync (Using MongoDB and Redis or RabitQM) and then the plugins

lethal coral
#
p.launchProjectile(EnderPearl.class, Movement.getVector(p, Movement.Direction.FORWARDS, 1.5));

Why does this not trigger the PlayerLaunchProjectileEvent event?

sterile token
#

?ask

undone axleBOT
#

If you have a question, please just ask it. Don't look for staff or topic experts. Don't ask to ask or ask if people are awake or available. Just ask the question to the channel straight out, and wait patiently for a reply. Make sure you use the right channel regarding the topic of your question. Create a thread in case the channel is already in use!

final monolith
sterile token
#

if you have dought ask it

#

Dont "ask for help"

#

Ask giving your error/question and code using

#

And if possible what you are wanting to do

final monolith
#

ok i will try again, wait

sterile token
#

Yeah, no problem

final monolith
#

At 1.8-1.12 the NMS contains the class IDataManager, that allows to change world settings, like directory, player data's file, etc... But in the newer versions that classes doesn't exists anymore, someone makes any idea?

buoyant viper
#

check mappings

#

it probably exists under a new name

final monolith
buoyant viper
#

because nms with spigot uses mojmap now iirc

#

so u need to see if it still exists but under a new name

final monolith
#

The mojmap is a site or something like?

#

sorry for the possible stupid question

buoyant viper
#

mojmap = mojang mappings

#

aka the names for things like classes, fields, and methods mojang themselves used in their code

young knoll
final monolith
quaint mantle
#

never heard that before

lethal coral
dusk flicker
#

should add that to a command

#

๐Ÿ˜‰ imaginedev

tidal hollow
#

Can somebody help me? I want to do that during the storm there is a bossbar that tells you the time that the storm has left

subtle folio
#
ItemStack pHead = new ItemStack(Material.PLAYER_HEAD);
            ItemMeta pHeadMeta = pHead.getItemMeta();
            pHeadMeta.``` im trying to set the metadata of this itemstack to a player's head. I dont see any method to setOwner or anything like that. What can I do?
lethal coral
#
    public void onShoot(PlayerLaunchProjectileEvent event) {
        if(event.getProjectile().getType() == EntityType.ENDER_PEARL){
            event.getProjectile().addPassenger(event.getPlayer());
            event.getPlayer().getInventory().setItem(4, Items.getEnderButt(2));
        }
    }

The mounting works, but the item is not added to their inventory in that slot. ๐Ÿ˜ฉ

lethal coral
#

SkullMeta skullMeta = (SkullMeta) pHeadMeta;

subtle folio
#

yep thanks,

low temple
lethal coral
low temple
lethal coral
#

no errors

low temple
lethal coral
#

adding a bukkitrunnable for 1 second fixed the issue

#

I could probably just wait a tick but I did 1 second to be sure

lethal coral
low temple
#

Oh is it a custom item?

lethal coral
#

yeah

low temple
#

gotcha, glad its working

wary harness
#

What would be easy way for converting CRROTS - block material to CARROT item stack

#

@ivory sleet

#

maybe you know

ivory sleet
#

maybe like

quaint mantle
wary harness
#

Material for Carrot

#

Block uses CARROTS

#

and ITemStack CARROT

quaint mantle
#

ohhhh

wary harness
#

now I am looking a way to get proper ID CARROT

#

when player brakes block

#

so they can just put in config CARROT

#

not CARROTS

#

because usally people look for material id by inventory

#

and then they don't know they need to use CARROTS because in inventory on item stack is CARROT

low temple
#

if its a carrot block

wary harness
#

and I need to return CARROT

#

actual drop material type

low temple
#

im confused on what youre trying to acomplish

wary harness
#

where people are putting proper material names

#

and when player is braking block it check

#

is that in config

low temple
#

so then check if the type equals either or

#

if theyre the same

wary harness
#

and usually people will put id of ItemStack

#

not ID of block

low temple
#

right so make a special case for carrots

#

and make it return true for CARROT and CARROTS

wary harness
#

to complicated and ugly I am looking if there is any way in api

low temple
#

post code

wary harness
#

to get that corresponding block

low temple
#

?paste

undone axleBOT
short raptor
#

Hey guys, what steps can I take to avoid players taking items from inventories that I create (that they're not supposed to take from)?
Some people have already found a way to get the items out even though I do event.setCancelled(true) on those events.

kind hatch
short raptor
kind hatch
#

Is your inventory set per player or just one that everyone accesses?

short raptor
#

They run a command and it opens, it's just for information purposes and not interactive

#

I didn't even know you could take items from a chest like inventory to offhand directly lmao

#

Is there anything I can really do in the case of low tps?

#

I guess I could give all the items special tags and check every player inventory event for them

kind hatch
#

Well if you cancel the InventoryClickEvent, that should prevent most methods for taking the items. You will need a check for the offhand, which I think there is an event you can listen for. Once you make those you may want to update the player inventory to remove ghost items. Player#updateInventory()

short raptor
#

Alr

#

Would also closing and reopening the inventory on click help?

#

Or is that just pointless

kind hatch
#

I donโ€™t think there is much you can do about low TPS situations. Besides, if the TPS is that low, the server owners are probably trying to figure out how to fix it.

kind hatch
kind hatch
short raptor
#

And when there's an inventory click event, if the inventory that caused the event = the inventory that my class is opening, I'll cancel it

kind hatch
#

Ah, I think I had some issues with a setup like that and switched to using a map that holds an inventory and a player uuid so I can always get the right one. That could be another possibility is the inventories donโ€™t match.

sly trout
#

for an ArrayList<> when you do .get()

#

if the index is out of bounds does it return null?

#

or does it throw an exception

quaint mantle
#

java.lang.ArrayIndexOutOfBoundsException

i guess

sly trout
#

yes thank you

quaint mantle
#

np

sly trout
#

that was a dum question lol

quaint mantle
#

There are no stupid questions only stupid answers :D

glossy dirge
#

hello how to reload default config ?

sly trout
#

๐Ÿ˜„

sullen marlin
#

reloadConfig()

glossy dirge
lethal coral
#

anybody have experience with the bungee cord scoreboard api? I can't find any examples and when I tried to use it, it didn't actually show a scoreboard.

glossy dirge
#

hello how do i make like this ?, do i have to use Placeholders.

  message: '{#602ac3} Joined' #602ac3 is hex color
quaint mantle
#

Hi, how do I get the number of drops when a block is mined?

vocal cloud
#

?jd

quaint mantle
vocal cloud
#

Afaik it's not.

quaint mantle
#

Since Iโ€™m trying to make cut clean that is compatible with fortune

vocal cloud
#

If you want to do custom drops then follow what the docs says to do

quaint mantle
#

Alright, thanks

quaint mantle
vocal cloud
quaint mantle
#

It says this

#

Canโ€™t add new items but can remove

#

So I dunno if I can just directly replace

#

For example raw iron to iron ingot

vocal cloud
#

That's the recommended method unless you're adding on top of the drops

quaint mantle
#

Oh aight, thanks

#

The hell is cut clean

sterile token
#

Why im getting dependency not find when using maven dependency (a Project installed on local repo) on a project?

sleek turret
#

is you dependency a maven project?

buoyant viper
#

he say's installed into maven local so id assume it is

sleek turret
#

hmmm, he could try putting it into his library folder and then calling the dependency from there

#

also make sure you've reloaded ur maven

#

idk about other ide's but intellij makes you reload maven

#

Also, is it in a scope?

cold pawn
#

I'm making player corpses that spawn an NPC with the player's skin and the NPC laying down when the player dies. An issue I'm having is the NPC's skin isn't always the players and instead is an Alex or a Steve skin. Does anyone know why the skin of the NPC doesn't always load? Is their a way to fix this?

lethal coral
#
    @EventHandler
    public void onJoin(PlayerJoinEvent event){
        Util.initializePlayer(event.getPlayer());
        Bukkit.getScheduler().scheduleSyncRepeatingTask(SpeedyHub.instance, new Runnable() {
            @Override
            public void run() {
                if(event.getPlayer().isOnline()){
                    Particles.playSpiral(event.getPlayer());
                }

            }
        }, 0L, 90L);
    }

How can I cancel this repeated task if the player isn't online? scheduleSyncRepeatingTask using BukkitRunnable instead of Runnable is deprecated and no longer works

sullen marlin
#

Read the docs to see how to use a BukkitRunnable

lethal coral
sterile token
#

How i install maven dependencies to local repo?

#

Let say i created a proejct, and i want to deploy it on local repo

#

Cuz i want to use it as dependency on another project

hardy swan
sterile token
#

it doesnt work

#

It still saying that maven cannot resolve the dependency

#

Idk why its trying to download it from Maven repo

#

When its locally

hardy swan
#

Check your local .m2

#

Is the jar there?

calm linden
#

!help

#

!resources

#

?resources

undone axleBOT
sterile token
wet breach
#

?jd

wet breach
#

should look at the javadocs and use the search function

#

be surprised in what you might find ๐Ÿ˜›

solemn valley
#

Found that the former was the easiest since it's just one line

#

So wondered if there was any difference in security/efficiency etc

wet breach
#

perform command is a way to use another plugins commands without having to hook or depend on said plugin directly

#

or to invoke server commands

solemn valley
wet breach
#

Should yes

solemn valley
# wet breach Should yes

Ah kk, so if I don't need any direct info from my Bungee Plugin, I can just do performCommand instead of sending out a message and setting everything up

#

Like a one-way street

wet breach
#

one way of looking at it lol

solemn valley
waxen plinth
#

Grant is typing...

humble idol
#

lol

#

(this is mainly directed at md_5 since they're who i was discussing this with, but i dont want to ping them in case they dont like being pinged. also sorry if this is the wrong channel--wasnt sure if it belonged here or in #general)
hey, im the one who reported SPIGOT-6917, the issue about /trigger

considering it seems there is an in-depth discussion to be had about how to address this issue, would it be better to discuss it over discord instead (perhaps in DMs)? i find discussion over discord to be much easier, especially since this discussion might be more on the lengthy side. plus then we (me especially with my edits) wouldnt be sending so many email notifications to all the watchers for each message

and of course, there would be no obligation to respond to me immediately if we do discuss it in discord, just as there isnt over jira. it would just be easier due to discord being synchronous, and because it's easier to keep track of full discussion in discord than in jira comments

wet breach
humble idol
#

it can, im just thinking it might be more efficient over discord

#

we could do it in the server instead if that'd be better; DMs was just one idea

wet breach
#

it would be yes ๐Ÿ™‚

#

but I am just saying it doesn't need to be DM's

#

however there is a thing called threads

humble idol
#

ah okay, yeah

wet breach
#

if you feel you don't wan to clutter the channel ๐Ÿ˜›

humble idol
#

oh yeah, totally forgot about those. that would be perfect for this

wet breach
#

this lets everyone participate, and become aware of the issue at hand as well as offer solutions and MD can respond if he feels like it ๐Ÿ™‚

#

seems like a win all around

humble idol
#

๐Ÿ‘Œ which channel would be the best place to make a thread for that?

wet breach
#

this one since its development

#

the help server is more for people needing help setting up or running their server ๐Ÿ˜›

hasty prawn
#

Just right click your original message and "Create Thread"

humble idol
#

oki doki. (i was thinking either here or #general)

#

SPIGOT-6917

wet breach
#

Woo

#

now sometime later I need to go read up on that issue

#

because I am unfamiliar with it

humble idol
#

im willing to explain anything

#

on the data pack dev side of course

#

im not too knowledgeable on the plugin side

wet breach
#

Well its more or less this is kind of my gaming time ๐Ÿ˜›

humble idol
#

ahaha, doesnt have to be right now obviously

wet breach
#

Ah data packs that is why I am not familiar with it

#

I don't normally mess with those things

quaint mantle
#

i still dont know where is datapack in nms

#

i do see the advancements and stuff though

spiral light
#

its in MinecraftServer or DedicatedServer iirc

prime reef
#

so how would one go about removing the most recent component from a chat component builder?

#

the API is incredibly awkward about that

sullen marlin
#

uh why would you do that

#

just dont add it?

prime reef
#

I'm torn between "yeah I guess I could just track how many elements I've processed and only add the newline if it's not the very last element" and "it should still be possible to remove it"

sullen marlin
#

there is a removeComponent method

#

but I think a size method was overlooked :p

tender shard
frosty flax
#

aight

tidal hollow
#

Can somebody help me? I want to do that during the storm there is a bossbar that tells you the time that the storm has left

tender shard
#
  1. Create a bossbar (Bukkit.createBossBar iirc)
#
  1. World.getClearWeatherDuration() should return the amount of ticks left until the weather clears up
#
  1. Schedule a running task that runs every tick or every second etc to lower the progress until the weather is cleared again
south raft
#

hey im new to spigot how would i have my plugin respond in chat only to the player who wrote the command

hollow bluff
#

By sending a message to the sender. sender.sendMessage

south raft
#

oh thats easy thanks

quaint mantle
#

yo

#

how do I make a fireball summon

#

with this command

#

player.getWorld().createExplosion(player.getLocation(), 100);

eternal oxide
#

launchProjectile not createExplosion

quaint mantle
eternal oxide
#

yes it does

#

You are doing it wrong is all

quaint mantle
eternal oxide
#

Look up launchProjectile in the javadocs

#

its available on Player

quaint mantle
#
             if (event.getItem() != null) {
                if (event.getItem().getItemMeta().equals(itemManager.wand.getItemMeta())) {
                    Player player = event.getPlayer();
                    player.getWorld().createExplosion(fireball.getLocation(), 100);
                    player.sendMessage("Ok");
eternal oxide
#

?jd-s

undone axleBOT
south raft
#

how do i get the players UUID

eternal oxide
#

Player#getUniqueId()

south raft
#

thanks

tender shard
#

?jd

tender shard
#

"how do I send message" - "how do I get a player's uuid" sure that's both valid questions but you could found both within 7 seconds by using the javadocs

wet breach
#

?spoon

undone axleBOT
#

Spoonfeed a newbie for a day and they'll come back with more questions. Teach them to find their own answers and you'll both be better off: you won't get stuck answering the easy questions and they'll be much more productive than before.

charred echo
#

im having some trouble getting a Collection<CommandData> from my interface Command

#

The Command interface has a getCommandData() wich returns a CommandData obj

#

and I want to get all command data from a collection of Command

#

something like

#
Collection<CommandData> commandDataCollection = Arrays.stream(commands).filter(Command::hasCommandData).....
#

but I'm not sure how I would go further

sullen marlin
#

Next: .map(Command::getCommandData

#

Then .collect(Collectors.toWhatever

charred echo
#
List<CommandData> cc = Arrays.stream(commandArray).filter(Command::hasData).map(Command::commandData).collect(Collectors.toList());
#

this returns a List<List<CommandData>>

#

not sure why, I really need to dive into the doc about streams in java tho

sullen marlin
#

Oh

#

flatMap might help

#

Rather than map

charred echo
#

flatMap does not take in a method reference tho

#

List<CommandData> cc = Arrays.stream(commandArray).filter(Command::hasData).map(Command::commandData).flatMap(Collection::stream).toList();

#

not sure if this does it

sullen marlin
#

I mean replace the original map with fkatMap

charred echo
#
public CommandHandler addCommands(Command ... commandArray){
        List<CommandData> commandData = Arrays.stream(commandArray).filter(Command::hasData).map(Command::commandData).flatMap(Collection::stream).toList();
        SkipBabe.jda.getGuilds().forEach(guild -> guild.updateCommands().addCommands(commandData).complete());
        commands.addAll(List.of(commandArray));
        return this;
    }
charred echo
sullen marlin
#

Or that, idk never actually used flatMap in java

charred echo
#

ill try, thank you

sullen marlin
#

Your example might be right

charred echo
#

worked

#

Anyone know a good lib/wrapper for the Github API for java

humble idol
#

(lmk if this is the wrong channel for this kind of question)

i couldnt find any information about this on google: which minecraft release versions are currently actively maintained by spigot? e.g. 1.16+

ivory sleet
humble idol
#

ah okay, thanks!

#

to be clear, that means if a spigot bug is patched, typically itll only be patched in the latest release? (excluding severe issues like log4j)

ivory sleet
#

Yes

#

Itโ€™s a bit painful maintaining more than one version, especially with all the patches and stuff

tardy delta
#

first time using java 16 uwu

marble tulip
#

how can i show a custom name of a mob permanently? Currently it only shows up when I look at it

young knoll
#

setCustomNameVisible(true)

marble tulip
#

I have that active but can still only see the name when I target the mob

#

@young knoll I do this, still can't see the name unless I stare at it

minor otter
#

Is it possible to give a player mining fatigue but make it so the effect doesn't actually show up at all

young knoll
#

You can set it to be ambient and hide particles

#

But itโ€™ll still show in the inventory

mortal hare
#

wtf

#

also its my java project

#

Invalidating Intellij Caches

#

doesnt work

#

restarting ide doesnt work

#

The project location is inside trusted locations configuration section

#

fixed it

#

i updated the ide

#

and it fixed it itself

quaint mantle
#

Hey everyone, can i upload a plugin just for checking updates?

#

I haven't found a good API to check the plugin updates and i don't know how should i check for update from my site

#

Can i use spigot to upload my plugin and just use it for checking my plugin updates?

#

or will i get banned and my resource gets deleted?

quaint mantle
#

@vagrant stratus (sry for ping)

#

is there a way instead of launching fireballs could I launch particles like water ballons?

#

ah what

#

I want to make

#

something like that purple

#

thing

young knoll
#

I think it's just a skull on an armor stand

shy wolf
#

on EntityDamageByEntityEvent event how to get the Entity that hit?

young knoll
#

The one damaged?

#

Or the damager?

shy wolf
#

damager

young knoll
#

getDamager

shy wolf
#

nop

shy wolf
#

not working

young knoll
#

I can assure you it does work

shy wolf
#

oh wait

obtuse ferry
#

my custom enchant makes it un anvil-able?

#

both ways

young knoll
#

The anvil won't recognize it

obtuse ferry
#

works with enchanted item

#

but doesnt function

tender shard
young knoll
#

Minecraft just thinks you are trying to combine two normal swords

tender shard
young knoll
#

Which it doesn't allow because neither are damaged

shy wolf
shy wolf
obtuse ferry
#

Ty

quaint mantle
#

like with the code?

#

this code?

tender shard
#

World#spawnEntity

quaint mantle
#
@EventHandler
    public static void onRightClick(PlayerInteractEvent event) {
        if (event.getAction() == Action.RIGHT_CLICK_BLOCK) {
            if (event.getItem() != null) {
                if (event.getItem().getItemMeta().equals(itemManager.wand.getItemMeta())) {
                    Player player = event.getPlayer();
                    player.getWorld().
#

what should I put after the getWorld().

tender shard
young knoll
quaint mantle
tender shard
#
ArmorStand armorStand = (ArmorStand) player.getWorld().spawnEntity(player.getLocation, EntityType.ARMOR_STAND);
young knoll
#

Imagine using EntityType and casting

#

:p

tender shard
quaint mantle
#

anyone?

tender shard
quaint mantle
tender shard
#

I already replied to you twice

young knoll
quaint mantle
#

I did not see that

tender shard
young knoll
#

spawnEntity iirc

tender shard
#

well there's also RegionAccessor#spawn

#

you probably meant that

young knoll
#

Ah yep

#

spawn

quaint mantle
tender shard
quaint mantle
#

the purple ballon

tender shard
#

ArmorStand has a method getEquipment

#

that returns an EntityEquipment object

#

and that object as a method setHelmet

quaint mantle
#

the code please?

tender shard
#

no

#

do it yourself

quaint mantle
#

like

#

simple form

#

a bit a noob

#

can understand

tender shard
#

if you can't create the code from the information I gave you, you should look at this instead:

#

?learnjava

undone axleBOT
tender shard
#

sorry but this channel is for general information and not for getting spoonfed ๐Ÿ˜›

quaint mantle
#

ok

#

ty for ur time

tender shard
#

you won't learn anything from just getting finished code

red sedge
#

How can I get the direction the block was placed in

#

in a blockplaceevnet

tender shard
#

getBlockPlaceAgainst()

#

returns the block that was clicked

red sedge
#

okay

#

but I need to find the direction

tender shard
#

then you have to calculate that yourself

red sedge
#

so id need to find the face that the block was placed against

#

I think

tender shard
#

e.g. if the blockPlaceAgainst is south of the new block, then it was placed north of the clicked block

red sedge
#

hmm

tender shard
#

what do you need it for? maybe there's an easier solution

red sedge
#

uh

#

in making a conveyor

#

so I need to get the direction to know what direction to push

tender shard
#

I think you have to do it manually then

#

e.g. if Z < Z of the block clicked, it's north

#

if Z > Z of the block clicked, it's south

red sedge
#

hm

#

I was just planning to check the blcoks around it

tender shard
red sedge
#

by adding to the location

grim ice
#

is there a way to get a free database for testing? i cant setup mine in my pc

#

f

#

maybe other ppl know

#

I tried

#

when i try to connect to it

#

it tells me

#

a CommunicationException

pale bear
#

How to check if a crop is fully grown? if (age.getAge() == age.getMaximumAge()) doesnt work, because a crop can be at age 5 but nonetheless fully grown?

grim ice
#

oh fuck

#

I DONT BRUH

#

I FORGOT TO

#

OMFG

#

actually i didnt forget i didnt know i needed it

#

@quaint mantle pls give link

#

?

pale bear
#

@EventHandler
public void onGrow(BlockGrowEvent e) {
BlockData data = e.getBlock().getBlockData();
if (data instanceof Ageable) {
Ageable age = (Ageable) data;
if (age.getMaterial() == Material.CARROTS) {
if (age.getAge() == age.getMaximumAge()) {

obtuse ferry
# young knoll Here is some cursed code i've used to fix it
public class PrepareAnvil implements Listener {

    @EventHandler
    public void onPrepareAnvil(PrepareAnvilEvent e) {
        AnvilInventory inventory = e.getInventory();
        ItemStack item1 = inventory.getItem(0);
        ItemStack item2 = inventory.getItem(1);
        ItemStack result = e.getResult();

        if (item1 == null || item2 == null) return;
        if (result == null) {
            if (item1.getType() == item2.getType()) result = new ItemStack(item1.getType());
        }

        if (result == null) return;

        boolean hasCustomEnchant = false;
        Set<Enchantment> all = CustomEnchants.getAll();
        for (Enchantment enchant : all) {
            if (item1.containsEnchantment(enchant)) {ApplyEnchant.applyEnchant(result, (EnchantmentWrapper) enchant, item1.getEnchantmentLevel(enchant)); hasCustomEnchant=true;}
            if (item2.containsEnchantment(enchant)) {ApplyEnchant.applyEnchant(result, (EnchantmentWrapper) enchant, item2.getEnchantmentLevel(enchant)); hasCustomEnchant=true;}
        }

        if (!hasCustomEnchant) return;

        e.setResult(result);
    }
}

is there anything inheritly wrong with this, my code is much much shorter

grim ice
#

i entered first link

minor otter
#

How would I test if for if the sides of a mushroom block are true or false

young knoll
grim ice
#

help one is 3mb one is 400mb+

#

wtf

obtuse ferry
young knoll
#

?tryit

#

Welp

#

?tryandsee

undone axleBOT
pale bear
#

Just a simple harvester plugin, but thats not the problem. I was just wondering if there is a way to detect if crops are fully grown. Because they can be fully grown even though they arent at max age.

young knoll
#

No they can't

pale bear
red sedge
#
        Block block = e.getBlock();
        Block clickedBlock = e.getBlockAgainst();
        char returnValue = 'E';
        if (block.getLocation().add(0, 0, -1).getBlock().equals(clickedBlock))
            returnValue = 'S';
        else if (block.getLocation().add(0, 0, 1).getBlock().equals(clickedBlock))
            returnValue = 'N';
        else if (block.getLocation().add(1, 0, 0).getBlock().equals(clickedBlock))
            returnValue = 'W';
        return returnValue;``` Is there a better way to do this
red sedge
#

fully grown means max age

pale bear
#

thanks

grim ice
#

@quaint mantle

#

im downloading these stuff

#

do I need the MySQL Server

#

yes i downloaded that

#

and its downloading all that shit with it

red sedge
#

how can I push an entity

tender shard
#

Entity#setVelocity

red sedge
#

hm

tender shard
#

also, where do you want to push them to?

grim ice
#

which one

tender shard
grim ice
#

im getting an error

#

when connecting to my databasae

grim ice
smoky oak
#

so i do have the spigot-api as library but the import org.bukkit does not get recognized after the intellij update... anyone knows why?
so apparantly updating removed dependencies

grim ice
#

I DOWNLOADED THE CONNECTOR

#

oops caps

#

anyways still havig the error

#

Caused by: java.net.BindException: Cannot assign requested address: connect
[14:37:03 WARN]: at java.base/sun.nio.ch.Net.connect0(Native Method)
[14:37:03 WARN]: at java.base/sun.nio.ch.Net.connect(Net.java:579)
[14:37:03 WARN]: at java.base/sun.nio.ch.Net.connect(Net.java:568)
[14:37:03 WARN]: at java.base/sun.nio.ch.NioSocketImpl.connect(NioSocketImpl.java:588)
[14:37:03 WARN]: at java.base/java.net.SocksSocketImpl.connect(SocksSocketImpl.java:327)
[14:37:03 WARN]: at java.base/java.net.Socket.connect(Socket.java:633)
[14:37:03 WARN]: at com.mysql.cj.protocol.StandardSocketFactory.connect(StandardSocketFactory.java:155)
[14:37:03 WARN]: at com.mysql.cj.protocol.a.NativeSocketConnection.connect(NativeSocketConnection.java:63)
[14:37:03 WARN]: ... 20 more

tender shard
#

you can't just download an MSI file and expect it to work in your java app

tender shard
#

e.g. if your DNS configuration is fucked up

grim ice
#

its my address

#

everything is on my machine

obtuse ferry
# young knoll Doesn't level up enchants
@EventHandler
    public void onPrepareAnvil(PrepareAnvilEvent e) {
        AnvilInventory inventory = e.getInventory();
        ItemStack item1 = inventory.getItem(0);
        ItemStack item2 = inventory.getItem(1);
        ItemStack result = e.getResult();

        if (item1 == null || item2 == null) return;
        if (result == null) {
            if (item1.getType() == item2.getType()) result = new ItemStack(item1.getType());
        }

        if (result == null) return;

        Map<Enchantment, Integer> enchantsToApply = new HashMap<Enchantment, Integer>();
        Set<Enchantment> all = CustomEnchants.getAll();
        for (Enchantment enchant : all) {
            if (item1.containsEnchantment(enchant)) enchantsToApply.put(enchant, item1.getEnchantmentLevel(enchant));
            if (item2.containsEnchantment(enchant)) {
                if (!enchantsToApply.containsKey(enchant)) { // if it doesn't already contain add like normal
                    enchantsToApply.put(enchant, item1.getEnchantmentLevel(enchant));
                } else {
                    int level1 = enchantsToApply.get(enchant);
                    int level2 = item2.getEnchantmentLevel(enchant);

                    if (level2 > level1) {
                        enchantsToApply.replace(enchant, level2);
                    }

                    if (level2 == level1) {
                        enchantsToApply.replace(enchant, level2+1);
                    }
                }
            }
        }

        if (enchantsToApply.size() == 0) return;

        for (Enchantment enchant : enchantsToApply.keySet()) {
            ApplyEnchant.applyEnchant(result, (EnchantmentWrapper) enchant, enchantsToApply.get(enchant));
        }

        e.setResult(result);

Does now ๐Ÿ˜…

tender shard
grim ice
#

Idk

tender shard
#

show your code pls

grand flint
#

Hey guys, you know how in the nether since the nether update the color of the atmosphere is different to the biome you are in. Is there a way to use that with code, and can I use it in the overworld or any other dimension?

tender shard
grand flint
tender shard
#

oh okay. hm

#

well let me try to find the thread

tender shard
#

are you on 1.18?

grand flint
#

Yes

tender shard
#

check out the BiomeFog class

grand flint
#

Thank you

tender shard
#

here's a plugin that does similar things

#

but it's using the obfuscated NMS names

grand flint
#

Ok thank you very much for finding that

tender shard
#

np ๐Ÿ™‚ I hope it helps ๐Ÿ˜„

grand flint
#

oo it can be used with data packs!

tender shard
#

sure, datapacks can do that too

grand flint
#

There is also a command for it ๐Ÿค”

tender shard
#

whut?

#

which command?

grand flint
#

/fog apparently

tender shard
#

nope

#

that's not a vanilla command

tender shard
#

that's bedrock

#

not java edition

grand flint
#

Oh ๐Ÿคฆโ€โ™‚๏ธ

tender shard
#

maybe it exists in java too (custom fog through resource packs), but there's definitely no /fog command in vanilla ๐Ÿ™‚

grand flint
#

Hope it does, datapacks would be easier for custom dimensions and biomes, otherwise I'd need to find each biome with the code

#

It would be smoother to have it in a datapack then changing the fog whenever a member's biome updates

tender shard
#

if datapacks are a solution for you, maybe look at Terralith or what's it called to see what's possible and what isn't

grand flint
#

Alright thank you

young knoll
#

You can color fog via custom biomes

tender shard
grand flint
#

Still waiting for custom structures to come back tough :(

#

Thank you guys again for the help

obtuse ferry
#
@EventHandler
    public void onEnchantTable(PrepareItemEnchantEvent e) {
        if(e.getItem().getType() != Material.DIAMOND_SWORD) return;
        e.getOffers()[0] = new EnchantmentOffer(CustomEnchants.BLADEBEAM, 1, 1);
    }

Can you not add custom enchant to enchant table? It removes the text of the enchant and then just applies the default enchant

young knoll
#

Nope

tender shard
#

but yeah, the client will never show your custom enchantments - it wouldn't even be able to know their name because they are not in the client's language files

obtuse ferry
#

I don't mind it not showing in the GUI aslong as they get it

warm light
#

what is LEASH_HITCH ?

obtuse ferry
tender shard
warm light
#

oh

tender shard
#

"it doesn't work" is always a bit uninformative

#

what exactly doesn't work

#

no

#

?notworking

undone axleBOT
#

"Does not working" is a useless statement. Please describe what exactly is not working, what you expect it to do, and what actually happens. If you get any console errors, also ?paste the entire stacktrace.

obtuse ferry
#

But they recieve sharpness

crisp forum
#

On AsyncPlayerChatEvent I cancel event and Bukkit.broadcast the Message with adding text components

#

But some plugins add special chats like gangchat, island chat etc and my plugin broadcasts them too

#

What is not clear there

#

I'm trying to add hover event thing to the chat messages do you know it

dusk flicker
#

Don't broadcast the message

#

Set the format

crisp forum
warm light
#

is there anything wrong?
((!e.isInsideVehicle()) || e.getCustomName() == null) not working

dusk flicker
crisp forum
#

Did you understand what am I trying to do

#

I'm trying to add Hover and Click events to message not trying to change Message content

dusk flicker
#

Yes, but you need to have the message have the actual components in them

#

Unless you don't want them in the message/format

undone axleBOT
#

"Does not working" is a useless statement. Please describe what exactly is not working, what you expect it to do, and what actually happens. If you get any console errors, also ?paste the entire stacktrace.

tender shard
#

sry ๐Ÿ˜„

tender shard
dusk flicker
#

It is great

radiant aspen
crisp forum
grim ice
#

?paste

undone axleBOT
radiant aspen
crisp forum
#

I'm normally using it as method not an event handler, for better reading I removed other params and pasted it as like event handler

radiant aspen
#

Well thats why its not working

#

You need the event handler

radiant aspen
#

I gtg now tho

crisp forum
#

It is working, the problem is some plugins add special chats like gangchat, island chat etc and my plugin broadcasts them too

tender shard
#

wait whut

#

why do you broadcast chat messages

mortal hare
#

should i try to put my inventory calculations to another thread

crisp forum
#

What should I do instead?

mortal hare
#

or that's just too much hassle

spiral light
grim ice
#

im

#

my mysql connection is timing out

mortal hare
#

man i hate

#

how almost everything in nms

#

thread unsafe

#

thanks to the community who managed to improve this mess

red sedge
#

Location#add is really quirky to use

grim ice
#

?paste

undone axleBOT
grim ice
mortal hare
#

also

#

nvm

visual tide
#

is it possible to detect a player shift-double clicking a whole inventory?

tender shard
tender shard
#

you can't click a "whole inventory"

#

you can only click single slots

#

and ofc yo ucan detect that

#

(unless you're in creative, then no)

visual tide
#

i mean shift-double clicking

tender shard
#

sure you can detect that

visual tide
#

like when you click over all the items of that type

tender shard
#

ah alright

#

yeah one sec

#

InventoryClickEvent

#

InventoryAction.COLLECT_TO_CURSOR

#

I think

#

try it

visual tide
#

pretty sure thats the one where you double click to collect all items of one type to a stack you double-clicked

tender shard
#

hmmm

#

alright then I have another idea

naive bolt
#

when i do DiscordSync.getInstance() it hylights red?

tender shard
#

getInstance() doesn't exist

visual tide
#

did you implement a getInstance method?

#

also

#

?di

undone axleBOT
tender shard
#
        public static void debug(InventoryClickEvent event) {
            Inventory top = event.getView().getTopInventory();
            Inventory bottom = event.getView().getBottomInventory();
            logger.warning("============================================================");
            logger.warning("Top inventory holder: " + (top.getHolder() == null ? null : top.getHolder().getClass().getName()));
            logger.warning("Bottom inventory holder: " + (bottom.getHolder() == null ? null : bottom.getHolder().getClass().getName()));
            logger.warning("InventoryAction: " + event.getAction().name());
            logger.warning("Clicked inventory holder: " + (event.getClickedInventory() == null ? null : (event.getClickedInventory().getHolder() == null ? null : event.getClickedInventory().getHolder().getClass().getName())));
            logger.warning("Current Item: " + event.getCurrentItem());
            logger.warning("Cursor: " + event.getCursor());
            logger.warning("Hotbar Button: " + event.getHotbarButton());
            logger.warning("Raw Slot: " + event.getRawSlot());
            logger.warning("Slot: " + event.getSlot());
            logger.warning("Slot Type: " + event.getSlotType().name());
            logger.warning("Left Click: " + event.isLeftClick());
            logger.warning("Right Click: " + event.isRightClick());
            logger.warning("Shift Click: " + event.isShiftClick());
            logger.warning("============================================================");
        }
#

of couse add @EventHandler

#

then do the click you mentioned

#

and see what it prints

#

then you should be able to detect it according to what information this prints

visual tide
#

alr

naive bolt
#

this video uses it

visual tide
tender shard
#

e.g. stuff like this:

#
public class YourMainClass extends JavaPlugin {
  private static YourMainClass instance;

  public static YourMainClass getInstance() { return instance; }

  {
    instance = this;
  }
}
naive bolt
#

why does it work in the video

visual tide
#

oh well thats ducking brilliant

#

the client sends every single stack as if it was a normal shift-click

#

thanks mojang ๐Ÿ’”

opal juniper
#

itโ€™s not always possible or a good idea

#

extend JavaPlugin

naive bolt
#

its a bungeecord plugin btw if this helps

opal juniper
#

oh ok

fleet dirge
#

Hello!

        <!-- Bungeecord -->
        <dependency>
            <groupId>net.md-5</groupId>
            <artifactId>bungeecord-api</artifactId>
            <version>1.18-R0.1-SNAPSHOT</version>
            <type>jar</type>
            <scope>provided</scope>
        </dependency>

I am trying to add Bungeecord to my pom.xml, but since few days I am getting 2x missing dependencies. Am I using the wrong version?

naive bolt
#

if i use bungee

opal juniper
#

yeah you should extend Plugin

#

whatโ€™s the error

#

oh lol

opal juniper
#

yeah you need what alex posted

#

or di it cause itโ€™s just a command class

naive bolt
#

thanks it insnt highlighted anymore

fleet dirge
#

Bungeecord Maven Dependency

grim ice
agile sinew
#

how to give entity damage caculating with armors and buffs

blazing rune
#

Ok so like I'm trynna make a thing where if you have 1000+ kills you can unlock an enchantment, but Idk how to make it check if the player has 1000+ kills I tried with
if (p.getStatistic(Statistic.PLAYER_KILLS) == 1000) {
// Enchantment is unlocked
}

But it only checks if you have exactly 1000 kills soooo anyone care to help?

spiral light
#

xD

#

?learnjava

undone axleBOT
blazing rune
#

O lol

spiral light
#

you litterly just ask for == 1000

quaint mantle
#

could anyone help me with my bungeecord server?

#

no?

blazing rune
#

Forget my stupidity lmfao

#

Aight stuffs ok

chrome wagon
#

Hi. I did command in another java class and i just trying to import that class to my main java class. The error is: 'getExecutor()' in 'org.bukkit.command.PluginCommand' cannot be appied to '(me.jakub.xcraft.commands.xrow)'

chrome wagon
#

@Override
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {

    if (sender instanceof Player) {
        Player p = (Player) sender;

        if(args.length > 0) {
            if (args[0].equalsIgnoreCase("help")) {
                p.sendMessage(ChatColor.translateAlternateColorCodes('&', "&2&lXrow&f&lRow" + " >> "+ "Nas plugin je zatim ve vyvoji. Ale brzy se toho hodne prida!"));
            }
        }
    }

    return true;
}
#

@Override
public void onEnable() {
System.out.println("Plugin funguje!");

    getCommand("xrow").getExecutor(new xrow());
}
waxen plinth
#

Can you use a paste site

#

?paste

undone axleBOT
waxen plinth
#

And show the full class please

#

Wait

#

You're doing getExecutor

#

You should be doing setExecutor

#

getExecutor is a method which takes no arguments and returns the executor for a command

#

setExecutor sets the executor for a command

#

You're using the wrong one

chrome wagon
#

im dumb

#

sorry

#

Im begginer

waxen plinth
#

No worries, but it's much easier to help you if you give your code right off the bat

grim ice
#

mysql errors

#

are sht

#

you just have to guess what u did wrong

naive bolt
#

anyone know how to fix whne you type it removes the charecter after it

grim ice
#

oh ik

#

click ins

#

in ur keyboard

naive bolt
#

Life saver

grim ice
#

xD

#

happened to me before

naive bolt
#

i accidently press it all the time and i have to restart ide

grim ice
#

same

visual tide
#

is ur SQL null?

wary harness
#

any one can point me to some good tool to compere mojang mappings and spigot

#

I am doing some reflections and now it is pain in the ass going and look what is correct name

#

of field

#

in spigot

spiral light
#

version ?

wary harness
#

from 1.16 up

#

I know

spiral light
#

then not

wary harness
#

1.17 is started with mappings from mojange

#

I am avare of that

spiral light
#

i only have smth for 1.17 and 1.18/.1

wary harness
#

well that is what I need

spiral light
#

https://timcloud.ddns.net/mapping/
the pages are big (contains all data) so you need to let it finish load and then you can search at top-left with class names and then go to a single page of that class (lagg-free)

wary harness
#

so just type in search bar name of class

#

By the way is there a way to get corresponding itemStack of CARROTS

#

I know it is CARROT

#

but for example you can check if CARROTS.isItem which will return false

#

so is there method which can pull that CARROT from CARROTS.getDropableType some thing like that

#

or do I need to make like some if statment check class

#

or enum

#

to do that my self

midnight shore
#

Hi guys! Can anybody tell me how to make an entity look at a player using his yaw?

hasty prawn
#

This is line 26 in LinkCommand?

grim ice
#

?paste

undone axleBOT