#help-development

1 messages · Page 2178 of 1

thorny dawn
#

thanks

hybrid spoke
#

me neither, just guessing

thorny dawn
#

guess thats not the cause of the issue

harsh totem
#

I restarted and i still get this error. the plugin works but I get this error

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.

hybrid spoke
#
  • any code?
harsh totem
#
    public void SpawnMob(RaidSpawnWaveEvent event){
        System.out.println(event.getRaid().getBadOmenLevel());
        if (event.getRaid().getBadOmenLevel() >= 5){
            Illusioner mob = (Illusioner) event.getWorld().spawnEntity(event.getRaid().getLocation(), EntityType.ILLUSIONER);
            event.getRaid().getRaiders().add(mob);
        }
    }```
#

this is the code

quaint mantle
#

thats totally not all of the stacktrace

#

why even cut some out

harsh totem
thorny dawn
#

?paste

undone axleBOT
hybrid spoke
#

bet getRaiders is unmodifiable

harsh totem
iron glade
#

Anyone knows why .setInvulnerable(true) is not doing anything for me?

hybrid spoke
#

what is line 17

harsh totem
crimson terrace
hybrid spoke
harsh totem
#

what does that mean

thorny dawn
#

u cannot add things to the collection if its read only

iron glade
hybrid spoke
crimson terrace
#

🙂

iron glade
#

only working when not in creative I guess

crimson terrace
#

well youre in creative, nothing except you should be invincible

tacit dagger
#

it worked, tysm

iron glade
#

I have to prevent a player from dying or getting damage, best way to do it?

hybrid spoke
#

cancel the event

iron glade
#

like he shouldn't even be able to get damage from people in creative

harsh totem
crimson terrace
#

cancel damage event involving that player

iron glade
#

hm okay

harsh totem
#

it just returns the raiders that are left but how do I add the Illusioner to it

humble tulip
#

Maybe just add it to the list

#

Wait nvm

harsh totem
#

i can't do that

crimson terrace
#

does it return the actual list of raiders or a copy?

humble tulip
harsh totem
#

it says a list of current raiders

humble tulip
#

Looks like this plugin uses nms

#

Seems like it returns a copy btw

crimson terrace
#

if its a copy then yeah adding wont work

tacit dagger
#

but its always turn into "type" idk why

#

even the config is null

sand frost
harsh totem
#

oh it works

#

thx

weary arch
#

If someone would know what are these commands doing ping me, thanks

#

Its custom world generator

sand frost
granite burrow
#

Hey I got a quick question, does OfflinePlayer#getLastPlayed return the last time they joined the server, including if they are currently on the server?

Example:
Player is online returns same session

  • or -
    Player is online returns the join time of last session

I'm not sure if that makes sense but if someone knows that would be very helpful 😄

opal juniper
#

it’s the last time they logged in

#

Returns:
Date of last log-in for this player, or 0

sand frost
#

You could test if the player is online with a second check. Use isOnline for that

granite burrow
#

Darn I ran a test where I deleted my PlayerData from the world and I got that its the last session (IE: not the current session)

harsh totem
#

it joins the raid

sand frost
granite burrow
#

Gotta find a new way to save the players login, since I dont want their login time to be linked with 1 world anyways :/

sand frost
harsh totem
#

I thought it would cause problems because I can't force it to join the raid but it joins every time

crimson terrace
#

is there anything I have to watch out for when making a Dependency and uploading it to spigot? this dependency is supposed to make it possible to add custom mobs without nms, anyone have tips?

tardy jacinth
#

is there any plugin where if you break a block it automatically place it back just like hypixel?

#

i need it for my server for the spawn.

sand frost
sand frost
crimson terrace
#

only dependency other than spigot is reflections, so that should be fine

#

thanks 🙂

harsh totem
#

How do I apply this a potion effect?
ItemStack item = new ItemStack(Material.TIPPED_ARROW);

sand frost
crimson terrace
#

its useful for registering all listeners in the project at once

sand frost
crimson terrace
#

maybe theres TippedArrowMeta

sand frost
sand frost
crimson terrace
#

I use java 16, not sure if it works on 17

hybrid spoke
#

avoid reflections where you can

harsh totem
#

like this? PotionMeta meta = (PotionMeta) item.getItemMeta(); meta.setBasePotionData(new PotionData(PotionType.INVISIBILITY, false, false));

crimson terrace
#

its onEnable

ashen agate
#

it should work on all java versions. It's the Spigot versions that are annoying to work with with reflections

crimson terrace
#

it gets called once

hybrid spoke
#

this is just overengeneering

sand frost
harsh totem
#

💀

hybrid spoke
#

but first re-set it to the item

crimson terrace
sand frost
sand frost
crimson terrace
#

oh ok that makes sense... good thing I dont have those 🙂

harsh totem
#

is says Potion Type is not upgradable

frail sluice
#

is there an event that gets triggered when a novice villager changes its trades by its own?

lethal coral
#

How is this null?

#
Objects.requireNonNull(Bukkit.getStructureManager().getStructure(NamespacedKey.minecraft("map" + random.nextInt(1))))
                .place(Util.getStructureSpawnLoc(), false, StructureRotation.NONE, Mirror.NONE, 0, 1, random);
harsh totem
#

is says Potion Type is not upgradable
When I do this:

                        meta.setBasePotionData(new PotionData(PotionType.INVISIBILITY, false, false));```
green prism
hybrid spoke
#

some names are misleading/could be better

sullen marlin
opal juniper
#

is that a "idk how to" or a "i cba to look"

hybrid spoke
iron glade
opal juniper
#

your fault lul

distant fern
#

Hi.
Im having an issue with my scoreboard. When a player joins it updates itself as it is in code. But when quit it doesnt. Any help?

   @EventHandler
    public void Restedlawsyztskichwychodzacych(PlayerQuitEvent e) {
        for (Player p : Bukkit.getServer().getOnlinePlayers()) {
            ScoreboardManager manager = Bukkit.getScoreboardManager();
            Scoreboard board = manager.getNewScoreboard();
            Objective obj = board.registerNewObjective("SUBOWICE", "dummy", "-=§e§lEKIPASMP§r=-");
            obj.setDisplaySlot(DisplaySlot.SIDEBAR);

            Score score10 = obj.getScore("       ");
            score10.setScore(6);

            Score score = obj.getScore("Zabójstwa: §e" + yamlFile.get(p.getName() + ".zabojstwa"));
            score.setScore(4);

            Score score2 = obj.getScore("Śmierci: §e" + yamlFile.get(p.getName() + ".smierci"));
            score2.setScore(5);


            Score score3 = obj.getScore(" ");
            score3.setScore(3);

            Score score1 = obj.getScore("Portfel: §e" + yamlFile.get(p.getName() + ".portfel"));
            score1.setScore(2);

            Score score69 = obj.getScore("Gracze Online: §a" + Bukkit.getServer().getOnlinePlayers().toArray().length);
            score69.setScore(2);

            Score score101 = obj.getScore("     ");
            score101.setScore(1);

            Score score71 = obj.getScore("    §e§lekipasmp.pl  ");
            score71.setScore(0);


            p.setScoreboard(board);
        }
    }

stuck oasis
#

Hey I get this error package com.earth2me.essentials does not exist when I try to package Maven

slate mortar
#

that method name gives me a headache

#

idk how scoreboards work, but i'm 99% sure that setting 2 scores on 2 isn't right

            Score score1 = obj.getScore("Portfel: §e" + yamlFile.get(p.getName() + ".portfel"));
            score1.setScore(2);

            Score score69 = obj.getScore("Gracze Online: §a" + Bukkit.getServer().getOnlinePlayers().toArray().length);
            score69.setScore(2);
slate mortar
#

what are you trying to do

harsh totem
#

get a tripped arrow

#

this is what I have now ItemStack item = new ItemStack(Material.TIPPED_ARROW); PotionMeta meta = (PotionMeta) item.getItemMeta(); PotionEffect effect = new PotionEffect(PotionEffectType.INVISIBILITY, 10, 1); meta.addCustomEffect(effect, true); item.setAmount(random.nextInt(1, 3)); item.setItemMeta(meta);

#

this is the error Potion Type is not upgradable

slate mortar
#

use 0 instead of 1

#

afaik they also count from 0

#

and invisibility 2 doesnt exist

harsh totem
#

oh

#

i thought it starts with 1

slate mortar
#

use /effect give yourname invisibility 10 1 and see yourself ingame

#

kinda weird if you ask me, but thats how things work

harsh totem
#

this gives me the arrow of invisibility with 22 seconds duration. how do I set it to 1 minute?
PotionEffect effect = new PotionEffect(PotionEffectType.INVISIBILITY, 10, 0);

slate mortar
#

new PotionEffectType(<effect>, <duration>, <modifier>)

#

10 duration obv means 10 seconds lol

harsh totem
harsh totem
iron glade
#

try 27 then lmao

harsh totem
#

why 27

#

ok

iron glade
#

would result in 60 seconds

harsh totem
slate mortar
#

tf?

iron glade
#

well you put 10 and got 22 seconds

#

according to that formula 27 would be 60 seconds

#

idk too, ask him

harsh totem
#
                        PotionMeta meta = (PotionMeta) item.getItemMeta();
                        PotionEffect effect = new PotionEffect(PotionEffectType.INVISIBILITY, 10, 0);
                        meta.addCustomEffect(effect, true);```
#

it makes the duration 22

prime kraken
#

Hello team, hope you are all good, I've one question, In my PlayerInteractEvent, i would like to do this : when a player click 20 times on my block, the block break, how can I do ? with a for(int i) ? Anybody as an example ? Thanks for reading

harsh totem
#

you need to save the amount of clicks somewhere

#

every event that starts doesn't remember the one before

prime kraken
#

So with a map who use an integer as argument

#

(i think)

harsh totem
#

and then check in PlayerInteractEvent if it's 20 and if so then break the block and reset the clicks

prime kraken
#

Nice, thank you for your help !

iron glade
#

No problem

harsh totem
sand frost
#

You would also need a player quit event to remove the player from the list when he leaves

subtle folio
iron glade
slate mortar
harsh totem
subtle folio
#

iirc potion effect duration is weird in spigot

sand frost
slate mortar
#

no idea

iron glade
harsh totem
#

k

iron glade
#

I'm curious now lel

tawdry finch
#

org.bukkit.plugin.InvalidPluginException: Cannot find main class `bangui.me.duke.Me.Duke'

sand frost
tawdry finch
#

how can i change my main class location lokl

iron glade
#

plugin.yml

#

ur path seems to be wrong

#

in main

subtle folio
sand frost
tardy delta
#

whats a weakhashmap again?

tawdry finch
iron glade
sand frost
sand frost
slate mortar
harsh totem
iron glade
iron glade
subtle folio
slate mortar
#

most likely because it's a not used value in the game? idk

harsh totem
#

I it returned to giving me this Potion Type is not upgradable

subtle folio
#

if you want to use uuid you need the join and leave events

sand frost
subtle folio
#

oh wait

#

i’m brain dead yep

sand frost
#

Okay? xD 👍

slate mortar
#

storing the whole player object as the key is kinda... useless

iron glade
#

^

subtle folio
iron glade
#

Never done that and never will

subtle folio
#

waste ram 😎

sand frost
slate mortar
harsh totem
#

does anyone know why it returns an uncraftable arrow?

                        PotionMeta meta = (PotionMeta) item.getItemMeta();
                        PotionEffect effect = new PotionEffect(PotionEffectType.INVISIBILITY, 27, 0);
                        meta.addCustomEffect(effect, true);```
slate mortar
#

oh wait

sand frost
iron glade
slate mortar
#

the duration is apparently indeed measured in ticks

#

WHY TF

subtle folio
iron glade
harsh totem
#

ill try to make 22 in ticks

slate mortar
#

RIGHT?!?

sand frost
harsh totem
sand frost
#

Oh okay 👍

slate mortar
#
 PotionEffect effect = new PotionEffect(PotionEffectType.INVISIBILITY, 60 * 20, 0); // equals 1 minute
#

if youre lazy

sand frost
slate mortar
#

and as bad as me in math

slate mortar
#

since when is effect duration measured in ticks

sand frost
#

Ohh Okay xD

iron glade
slate mortar
#

thats why i slowly start to quit mc lmfao

iron glade
#

nooo

slate mortar
#

unnecessary changes

#

that no one needs, and everyone hates

iron glade
#

we need some bad developers so the good ones look better in comparison

#

just a joke

sand frost
iron glade
#

xd

subtle folio
#

just make a tick utils function

harsh totem
#

and this Potion potion = new Potion(PotionType.STRENGTH); potion.setHasExtendedDuration(false); ItemStack item = potion.toItemStack(1);
return this in the console Potion Type is not upgradable

slate mortar
#

god, why is sound equalization such a weird thing

sand frost
slate mortar
#

MY HEADSET IS FUCKED UP

iron glade
#

which one you got?

slate mortar
#

because i fucked up the equalization

iron glade
#

reset it

slate mortar
#

logitech g pro x
was perfect before i started playing with the equalizer

slate mortar
iron glade
#

idk, software?

slate mortar
#

their software is dogshit

iron glade
#

true

#

razer and roccat software is trash too

slate mortar
#

stfu you idiot

#

roccat software is king

sand frost
#

I only use headphones not Headsets

iron glade
#

well I have a roccat keyboard and it's kinda annoying

slate mortar
#

i love it

iron glade
#

which one do you have?

slate mortar
#

it just works

#

vulcan tkl

iron glade
#

ah I got the skeltr

sand frost
slate mortar
iron glade
#

Roccat skeltr

slate mortar
#

is that some new one i didnt hear about?

#

ah no

iron glade
#

nah it's not new

harsh totem
iron glade
#

like 2 yrs old or smth

slate mortar
#

some old one i didnt hear about lmfao

#

looks ass

iron glade
#

is comfy af tho

harsh totem
#

why is this so weird

slate mortar
#

i love the vulcan keycaps

#

i wanna marry them

#

all of them

harsh totem
iron glade
#

best decision I made tho was switching to a wireless mouse

slate mortar
#

which one for you

iron glade
#

razer viper ultimate

slate mortar
#

ohh also razer

#

i see i see

iron glade
#

fully charged it runs for like a week

#

I just put it on the charging dock when I'm afk and easy to go

slate mortar
#

i just love the deathadder like since i was born, so it was obv which one i should get

sand frost
slate mortar
#

when the deathadder v2 got a wireless variant, i had to get it honestly

iron glade
#

I had a roccat mouse

slate mortar
#

i have 3 roccat mice lmfao

iron glade
#

and the fcking scrolling wheel got fucked up after like 6 weeks

slate mortar
#

and 2 keyboards

iron glade
#

kinda annoying when gaming or coding

slate mortar
#

its that weird one that i also have

#

dunno the name

#

looks like an egg

iron glade
#

wait I'll search the name

#

KONE

#

aimo

slate mortar
#

TF

#

Kone aimo best mouse of all time change my mind

iron glade
#

IK

#

it was comfy AF

slate mortar
#

i LOVE this sidebutton

iron glade
#

perfect for my hand

#

YES SAME

#

BUT

slate mortar
#

but mine had a problem

iron glade
#

I don't wanna buy it every 6 weeks

slate mortar
#

which made it make random doubleclicks

iron glade
#

yeah i heard of that

slate mortar
#

which is dumb as fuck

#

if you dont play 1.8 only

iron glade
#

i really loved the mouse cause it fit perfectly for my hand

slate mortar
#

exactly

iron glade
#

but the annoying scroll wheel bug just fucked it up

slate mortar
#

then i got the new one

#

idk the name

#

gosh

#

the kain

iron glade
#

the viper ultimate is kinda small for my hand

slate mortar
#

120 i suppose? idk

iron glade
#

hm idk

#

for now I'll just keep the viper

slate mortar
#

they have weird namings for their shit

iron glade
#

true

slate mortar
#

yea my deathadder is og

#

also keeps like 1 week for me

iron glade
#

That's so nice

slate mortar
#

charges in like 2-3 hours

iron glade
#

not having this dumb cable

#

looks cleaner on desk

slate mortar
#

my desk is fucked up anyway

sand frost
#

@iron glade @slate mortar Shouldn't you switch channels to #general ? This doesn't seem like development help anymore xD

slate mortar
#

THIS is general

#

yk

iron glade
#

^

slate mortar
#

it always has been

sand frost
slate mortar
#

#general is kinda weird

sand frost
#

You need someone to remind you of it to change it xD

slate mortar
#

no one wants to go in there

sand frost
slate mortar
#

read it

#

you can't have normal conversations in there

#

it's full of dumb bad memes

tardy delta
#

heh

harsh totem
#

guys?

sand frost
#

Looks like memes with some general chat stuff

slate mortar
harsh totem
#

that is still an uncraftable arrow

                        PotionMeta meta = (PotionMeta) item.getItemMeta();
                        PotionEffect effect = new PotionEffect(PotionEffectType.INVISIBILITY, 440, 0);
                        meta.addCustomEffect(effect, true);```
slate mortar
#

in that case

harsh totem
#

I don't think it's in ticks

#

the duration

slate mortar
#

it is

#

it says so

sand frost
#

But look @slate mortar. Our poor @harsh totem needs help and when you talk about roccat and stuff he can't post his request for help. 😢 xD

iron glade
#

what is even a tipped arrow?

slate mortar
#
    /**
     * Creates a potion effect. Assumes that particles are visible
     *
     * @param type effect type
     * @param duration measured in ticks, see {@link
     *     PotionEffect#getDuration()}
     * @param amplifier the amplifier, see {@link PotionEffect#getAmplifier()}
     * @param ambient the ambient status, see {@link PotionEffect#isAmbient()}
     */
    public PotionEffect(@NotNull PotionEffectType type, int duration, int amplifier, boolean ambient) {
        this(type, duration, amplifier, ambient, true);
    }```
sand frost
slate mortar
sand frost
harsh totem
#

😃

hybrid spoke
#

from now on i only report bugs i already have a fix for

slate mortar
#

you dont know me

slate mortar
#

do you?

harsh totem
iron glade
#

hey hey calm down

slate mortar
#

hehe

harsh totem
#

chillax

sand frost
sand frost
slate mortar
#

mine isnt either lol

iron glade
#

we 3 are german, let's face it

hybrid spoke
#

4*

iron glade
#

this is our discord now

harsh totem
#

im jewish 💀

slate mortar
sand frost
#

Deutsch ist halt auch einfach geiler XD

slate mortar
#

rule breaker

#

bAn HiM

hybrid spoke
iron glade
#

well, tbh I'm 3/4 italian and like 1/4 german or smth

slate mortar
#

got him

harsh totem
#

juys

#

guys

#

please

sand frost
slate mortar
sand frost
iron glade
hybrid spoke
#

whats the case

#

god arrived

iron glade
slate mortar
#

lmfao

slate mortar
#

but this is too much for me. i'm out

harsh totem
#

maybe i'll make my plugin output to the console what I hold and then i'll hold the arrow that I want to get

sand frost
iron glade
#

Never heard of it

sand frost
#

Can't remember it anymore xD

hybrid spoke
#

minesucht never was pay2win

#

neither had a plotworld

iron glade
#

german server?

hybrid spoke
#

yes

iron glade
#

I should join and tell them I am an operator

sand frost
#

.de tells you everything xD

hybrid spoke
#

minesucht was .net

#

it was very popular back in the days

#

but died a year ago

iron glade
#

like GommeHD? LMFAO XD

hybrid spoke
#

ye

iron glade
#

I remember when the server was so fcking full that you got kicked like every 2nd time

sand frost
#

Oh the server closed!? @hybrid spoke

hybrid spoke
#

just like the rewi-server

hybrid spoke
#

minecraft germany dies

sand frost
hybrid spoke
#

minigames die

#

citybuild is the new hype

sand frost
#

But who cares about that anyway if you have Hypixel and private SMPs xD

hybrid spoke
#

which i cant relate

harsh totem
#
[11:53:00] [Server thread/INFO]: ItemStack{TIPPED_ARROW x 1, POTION_META:{meta-type=POTION, potion-type=minecraft:long_invisibility}}```
sand frost
sand frost
harsh totem
#

these are vanila items

hybrid spoke
hybrid spoke
#

á long

harsh totem
harsh totem
hybrid spoke
#

SMPs can be fun for the first 2 weeks

sand frost
harsh totem
hybrid spoke
dense shoal
#

They didn't have a rollback plugin?

harsh totem
#

no

dense shoal
#

Yikes

sand frost
#

I was in a good one and slowly the server died out and no one really played anymore

hybrid spoke
#

the new griefergames server was fun

#

at least before they added their chests

harsh totem
#

it was for friends and someone manipulated the admin to give him op for a sec and then he whitlisted the griefer and the griefer joins the day later

#

in 3 am

#

he joined in 3am just to ruin the server

dense shoal
#

Servers that use op are yikes

hybrid spoke
#

why even is there an admin on a SMP?

harsh totem
harsh totem
hybrid spoke
#

fuck the hoster

harsh totem
#

🤨

sand frost
dense shoal
#

I'm sorry, no. OP is like the root user on Linux. You use root to make a user account and that's about it.

hybrid spoke
#

thats an unwritten rule

sand frost
harsh totem
#

So does anyone know how to get tipped arrow?
sorry for asking so many times but I tried to search in google and haven't found something that works

harsh totem
#

and it didn't help

#

there is no such potion type

harsh totem
hybrid spoke
#

long_ means the extended version of the potion type

harsh totem
#

yes but there is no such type

hybrid spoke
#

not bukkit sided

#

for what do you need it

harsh totem
#

I want to get a tipped arrow of invisibility.
1 with duration of 22 seconds and 1 with a duration of 1 minute

hybrid spoke
#

dont you therefor have the PotionData?

harsh totem
#

wait

#

can't I just get the item of the tipped arrow with the item ID?

quaint mantle
#

does somebody know how can I stop this task from running:
task1 = Bukkit.getScheduler().scheduleSyncRepeatingTask(plugin, new Runnable() {

#

I cant stop it

#

cuz the variable is an int

hybrid spoke
#

Scheduler#cancelTask

crude cobalt
#

Hey, guys, give please advice. What is the best way to implement such a scale so that the colors change sequentially. Red - reduction of the scale, yellow - the normal state of the scale, green increase the scale. The scale depends on the value of the variable. I think it can be implemented with if , if else and server threads. Are there other options?

https://www.veed.io/view/db05a626-5479-40db-a93d-c7431f50313a?sharingWidget=true

quaint mantle
hybrid spoke
harsh totem
hybrid spoke
crude cobalt
#

I want to create a stamina scale. This scale will change with a certain action. It depends on the variable.

harsh totem
#

there is no function to set anything in PotionData. there is only get functions

iron glade
#

Is there a way to add like a building with a command without having to manually set every single block?

crude cobalt
harsh totem
hybrid spoke
#

constructor

#

of potiondata

harsh totem
#

oh

rough drift
#

public class FakePlayer implements Player {
Bukkit.getOnlinePlayers().add(this);

why...?

crude cobalt
rough drift
#

is intelli high?

hybrid spoke
hybrid spoke
rough drift
hybrid spoke
#

you have to pass in a Class<? extends Player>

#

it wont just take the subtype

rough drift
#

an instance

#

of that

hybrid spoke
#

that would be too easy

rough drift
#

so... there's no way to add a custom player?

#

wait nvm

#

I can just imitate it

iron glade
#

How would I check if another specific plugin is installed?

rough drift
#

Bukkit.getPluginManager().getPlugin("name") != null

iron glade
#

ty

iron glade
hybrid spoke
#

but schematics also are technically block by block

iron glade
#

That's what I just looked into, would I need to use the worldedit api?

hybrid spoke
#

that would be the easiest

glossy scroll
#

Structure blocks

#

Structures, rather

iron glade
sand frost
quaint mantle
#

do you ppl know how can I check if players boots equipment in null

hybrid spoke
#

player -> inventory -> equipment -> boots == null

quaint mantle
sand frost
quaint mantle
naive drift
#

Hello there, is there a 2ay to change a packet message like"failed to log an authentication server... "?

hybrid spoke
#

just clientside i think

#

lmao

#

"Sir, did you try to restart your device?"

sand frost
#

Sry misread xD

sand frost
naive drift
hybrid spoke
sand frost
#

Change the language file. I think you can do this via a texture pack

sand frost
hybrid spoke
#

totally

sand frost
naive drift
#

Kay, i will look at it, we have a reaource pack that player Must have

sand frost
#

Never used fast login so I don't really know what it does or how it works

sand frost
naive drift
#

No its default minecraft kick handling if they dont have a premium minecraft

naive drift
#

Protocol Lib maybe?

sand frost
#

The question is what causes this message? Is it from a Plugin?

hybrid spoke
#

if it cant reach the authentication servers, how would it work with ProtocolLib?

sand frost
iron glade
#

I can't find the world edit maven dependency, anyone?

naive drift
hybrid spoke
harsh totem
#

how do I check if a pillager is a captain?

sand frost
sand frost
hybrid spoke
#

paw patrol

sand frost
sand frost
hybrid spoke
#

i will cancel you on twitter

sand frost
sand frost
harsh totem
tender shard
#

does someone have any example for when an EntityChangeBlockEvent is called BESIDES from a player stepping on redstone ore (setting "lit" to true)?

harsh totem
#

K thx

hybrid spoke
#

silverfish?

#

or do you mean only player related?

tender shard
iron glade
#

Does anyone know how to hook into the world edit api?

hybrid spoke
tender shard
#

oki perfect, then I'll use endermen as example thx

iron glade
#

I'm on that site but can't find an example how to hook into it

subtle folio
#

As a man of ASCII loving, whenever I try to send any art to console it comes out as ???

#

does anyone know of ascii art generators composed of just _ and | ?

#

or how to print to console better 😉

tardy delta
#

console is just meant to show logging output, not fancy stuff

crude cobalt
#

I used this code

harsh totem
#

maybe it's because it was summoned by me?

sand frost
harsh totem
#

./summon pillager

sand frost
#

Oh xD

harsh totem
#

does it need to spawn naturally?

sand frost
#

I think so

#

My question is. What type of caption do you want? The specific game set caption or one of them with a flag?

coarse shadow
#

?paste

undone axleBOT
harsh totem
#

@sand frost can I just check if he wears anything in his helmet slot?

sand frost
harsh totem
sand frost
harsh totem
#

that should work right? if (!p.getInventory().isEmpty())

#

p is pillager

twilit pulsar
#

heyyy, does any1 know of an tutorial on how to code scoreboard with changeable in config?

harsh totem
#

oh wait

#

they can have crossbows

#

idk

prisma osprey
twilit pulsar
#

like code

prisma osprey
#

Ah

twilit pulsar
#

Why else would i type in this channel.

subtle folio
hybrid spoke
#

sentences

#

maybe words

#

oh misread

twilit pulsar
torn badge
#

Anyone know a reason why FileConfiguration#set with a Location object just saves the Location String instead of splitting it into the ConfigurationSerializable keys?

prime kraken
#

Hello ! Hope you are all good, I've one question, I would like to spawn an item (i create the itemstack) when i right click on my clock (the item spawn at the location of the block) how could i do that ?

humble tulip
crimson scarab
#

way of checking if an item is a food?

humble tulip
#

Get the block u interacted with and if u wanna spawn it on the too of that block, get the block above it and add 0.5 to the x and z and soawn at that location

torn badge
humble tulip
#

See if it's food

humble tulip
torn badge
#

No

humble tulip
#

Can i see your code?

torn badge
humble tulip
#

What is defaultvalue

torn badge
humble tulip
#

Why don't u use config.set?

tender shard
#

I have this method but I think the name is misleading. My CustomBlockData thing implements PersistentDataContainer for blocks. But I'm now adding stuff like "automatically remove the custom blockdata when the block is broken", etc. I have chosen to add an option to prevent this, but "persistent" is probably the wrong word. Maybe I should call it "protected"? Any suggestions?

    /**
     * Gets whether this CustomBlockData is persistent. Persistent CustomBlockData will not be changed by any Bukkit Events
     * @see #registerListener(Plugin)
     */
    public boolean isPersistent() {
        return has(PERSISTENCE_KEY, DataType.BOOLEAN);
    }
torn badge
humble tulip
#

It doesn't need to

torn badge
#

Wait really?

#

Let me test

#

Same result

somber grove
#

Hello, let's see if anyone can help me. I play with spigot, and I don't know if it's because of that but mobs with nametags or caught objects shouldn't count for the mobcap, but they do, since when they reach 70 they stop spawning. Does anyone know why this happens, or if it has to do with spigot?

humble tulip
#

Can you show your entire method

torn badge
#

I expected that since addDefault() calls set()

humble tulip
#

?paste

undone axleBOT
tardy delta
#

are you just calling set and saving now?

torn badge
#

Only the config.set part is called

kindred valley
#

hello enchant item event is not working

#

i dont get any errors

#

its registered

humble tulip
#

So parser is null

torn badge
#

exactly

tardy delta
#

dunno wtf that code is doing

humble tulip
#

Just for debugging

#

Change from object to Location

torn badge
humble tulip
#

Maybe if it get object it just calls tostring

torn badge
tardy delta
#

what api version?

harsh totem
#

how do I check if a pillager has a banner?

ashen comet
#

i was trying to use custom skull

echo basalt
humble tulip
ashen comet
#

i switched from spigot-api to spigot after getting fresh jar from build tools

humble tulip
#

Oh u just wanna see if it has banner

harsh totem
#

not raider

echo basalt
#

or that, idk how banners are set

harsh totem
#

a normal pillager

ashen comet
#

still it dosent seems working

echo basalt
#

raider just means that it is part of a raid's mob set

kindred valley
#

how can i get the player who put the item on prepareanvilevent

tender shard
tender shard
harsh totem
# echo basalt get its inventory

p.getInventory().contains(Material.WHITE_BANNER)
I got this in an if statament and it returns false when the pillager has banner

#

the banner is white because this is the banner that the pillagers have

echo basalt
#

pillager.getInventory.getHead != null

harsh totem
#

Cannot resolve method 'getHead' in 'Inventory'

tardy delta
#

i guess its inv.getItem(slot)

harsh totem
#

what slot is the head

kindred valley
tardy delta
#

wait isnt it getEquipment?

harsh totem
#

oh yes

tardy delta
#

yep

harsh totem
#

I forgot

tardy delta
#

do people even use google

#

took me 5 sec

junior trench
hybrid spoke
#

?bing

undone axleBOT
harsh totem
#

still false if (p.getEquipment().getHelmet() != null)

sacred mountain
harsh totem
tardy delta
harsh totem
#

yes but it returns false when it wears banner

crude cobalt
#

How to perform some action during the time the player crouched? If you run the PlayerToggleSneakEvent event, then the event will be executed only once

tardy delta
#

shouldnt it execute whenever a player sneaks?

hybrid spoke
fierce salmon
#

im trying to get my plugin to register jda but the build() portion as an error

tardy delta
#

lmao

#

delete that message and refresh your token

hybrid spoke
#

and see what it says

tardy delta
#

build can throw exceptions

#

handle those

tender shard
harsh totem
fierce salmon
#

well either way I don't think what I have done with jda works

tender shard
#

noone can help you if you don't show us the error message

#

if you just say "i have an error", all I can say is "then fix this error"

tardy delta
#

hes just not catching the login exceptions

fierce salmon
#

theres no error, but it's just unfunctional

hybrid spoke
#

i think he blocked you @tardy delta

fierce salmon
#

who?

tardy delta
#

like this 👉👈

#

smh i wish methods could returns multiple things

harsh totem
humble tulip
#

Juet create an object that holds everything u wanna return

tardy delta
#

meh tuples when

uneven fiber
tardy delta
#

why that

#

hm there are libraries for it

harsh totem
#

pillager.getEquipment().getItem(0); should return the helmet slot, right?

terse raven
#

why not getHelmet()?

harsh totem
#

I checked if the helmet is not null and it returned false when the pillager wore a a banner

tardy delta
#

i mean there's not even a getItem(int) method

harsh totem
uneven fiber
#

what is the reason getHelmet isn’t working?

tardy delta
#

dont think 0 is a EquipmentSlot constant

terse raven
#

isPatrolLeader()

#

would that work?

coarse shadow
#

?paste

undone axleBOT
terse raven
coarse shadow
#

what

iron glade
#

Do I add a schematic file to the plugin's resources and copy it into a new directory in the onEnable() or how do I like add it?

iron glade
#

the plugins folder

terse raven
#

yea

iron glade
#

Just drag and drop into resources?

#

In Intellij

terse raven
#

don't just react if it is wrong

#

tell us how to do it instead

subtle folio
#

I dont know how to do it i havent touched schematics but my best guess is that you make a folder for it in your plugin folder then try to get the file and load it via that.

terse raven
#

then why the dumb reaction?

subtle folio
#

you manually put the schematic into your plugin folder

#

bc you werent providing help

#

you were giving useless comments

iron glade
#

I want that the plugin comes with the schematic

terse raven
#

he asked a yes or no question

subtle folio
iron glade
#

like when someone installs it it extracts the schematic into the plugins folder

subtle folio
iron glade
terse raven
# subtle folio he did not

He asked, and i quote: "Do I add a schematic file to the plugin's resources and copy it into a new directory in the onEnable()..."

#

which is literally what you just repeated

uneven fiber
#

chill

harsh totem
dusty herald
#

ok let's chill

subtle folio
crude cobalt
#

Is there any event that will run all the time, regardless of other events?

subtle folio
terse raven
#

which i responded to with yes

#

where is your problem

vocal cloud
#

The question is why would you want to run an event every tick scareDog

crude cobalt
harsh totem
terse raven
#

it is

#

as a class

harsh totem
terse raven
#

oh

uneven fiber
#

and do what you need to do

terse raven
dusty herald
harsh totem
#

tf?

terse raven
#

then try

subtle folio
#

the helmet is a banner no?

terse raven
#

isPatrolLeader

tardy delta
#

hmm logic, when my battery is 10% my screen becomes brighter

uneven fiber
iron glade
#

Kinda funny that the schematic contains over 21k lines of just 0s

echo basalt
dusty herald
#

i mean he finds it funny

#

that it has a bunch of 0s

echo basalt
#

wow

uneven fiber
#

bro people are so pretentious holy shit 😭😭

terse raven
harsh totem
dusty herald
#

isPatrolLeader should work

harsh totem
#

p.isPatrolLeader()

subtle folio
echo basalt
#

quality code

terse raven
dark arrow
#

I have made a code which allows zombie to tower up when player is at higher position then them but how can i allow zombie to bridge to them also

harsh totem
echo basalt
harsh totem
#
    public void Limit(EntityDeathEvent event){
        if (event.getEntityType() == EntityType.PILLAGER && event.getEntity().getKiller() != null){
            Pillager p = (Pillager) event.getEntity();
            if (p.isPatrolLeader()){
                Player player = event.getEntity().getKiller();
                PotionEffect effect = player.getPotionEffect( PotionEffectType.BAD_OMEN );
                if (effect != null && effect.getAmplifier() >= 5){
                    PotionEffect potion = new PotionEffect(PotionEffectType.BAD_OMEN, Integer.MAX_VALUE, effect.getAmplifier() + 1);
                    player.addPotionEffect(potion);
                }
            }
        }
    }```
echo basalt
#

you just happen to have 21k blocks and they're all with the blockstate associated to 0

tardy delta
#

i mean early returns are a thing

#

and you probably want to check if the killer is a player

harsh totem
#

here event.getEntity().getKiller() != null

tardy delta
#

instanceof Player?

uneven fiber
harsh totem
harsh totem
#

nothing else

iron glade
#

How would I copy this UFO.schem into plugins/myPlugin/schematics ?

uneven fiber
#

oh i see

#

didn’t know that

tardy delta
#

i mean it can be killed by an irongolem aswell

harsh totem
#

Otherwise it returns null

crimson terrace
#

false

#

it returns the last player to damage the entity

terse raven
#

event.getEntity() instance of Pillager

#

could you try that instead?

harsh totem
#

I told you that everything works fine until the check of the banner

terse raven
#

aight can't help you with this then

harsh totem
#

😢

summer scroll
#

How can I spawn a lightning but I don't want it to set block on fire.

crude cobalt
#

How to track that the player drank a bottle of water?

terse raven
crude cobalt
terse raven
terse raven
#

or there is an event called BlockIgniteEvent... you could just check for igniteCause ENUM - value LIGHTNING and cancel it.

summer scroll
#

Ah right

#

That's a better solution, thanks

terse raven
#

And you will need to check for location variable too, to prevent canceling fire from regular lightning.

crude cobalt
terse raven
#

then get the item in hand

#

i think it should be called before the item is actually consumed

#

event.getPlayer().getEquipment().getItemInMainHand().getType()

#

or something like that

summer scroll
#

Better to use PlayerItemConsumeEvent#getItem

terse raven
#

that gives the item it leaves behind

tender shard
terse raven
#

he has already tried it

terse raven
tender shard
summer scroll
#

Oh

#

He want to check If player drink a water bottle

#

A glass bottle that filled with water

terse raven
#

i haven't tried it

terse raven
#

they have different types

tender shard
#

ItemConsumeEvent#getType works fine

#

I'm using it in my stackresize plugin

crude cobalt
#

What should I compare it to, what should I specify in the ItemStack?

summer scroll
#

I can't find WATER_BOTTLE on the material

crude cobalt
tender shard
#

POTION

#

Material.POTION

#

isn't it?

#

oh wait no

crude cobalt
terse raven
#

could someone check in-game?

#

cast it to potion

#

and check if it has no effects

summer scroll
#

It is potion

crude cobalt
#

And i want get "water potion"

tender shard
#

check if the potion has any potioneffects

terse raven
tender shard
#

if no, it's a water bottle

summer scroll
frail sluice
#

what command permission do I put in the yml to only allow operators to use the command?

tender shard
#

any you like

terse raven
#

just don't assign it

humble tulip
#

just check if the sender is console

tender shard
tender shard
#

they want OPs to use it, not only console

humble tulip
#

ohh operators

#

lol

terse raven
terse raven
crude cobalt
tender shard
#
commands:
  stackresize:
    permission: stackresize.admin
permissions:
  stackresize.admin:
    description: Allows to use /stackresize
    default: op

now only people with "stackresize.admin" OR ops can use it

summer scroll
humble tulip
#

sender.isOP?

frail sluice
frail sluice
#

it'll still show up in the tab menu

summer scroll
#

You need to play around with the TabCompleter then

delicate lynx
#

players who don't have that permission won't see the command on the tab menu

terse raven
#

then add a tabcompleter

terse raven
delicate lynx
#

I missed that

tardy delta
terse raven
#

he just wants to forbid anyone else from using it

#

without permissions apparently

frail sluice
#

are there un obtainable permissions?

tardy delta
#

?

terse raven
#

just return when they don't have op

#

and add a tabcompleter

humble tulip
#

^^

terse raven
#

if you really don't want to use permissions

midnight shore
#

how can i cast a double to a float?

crude cobalt
#

Why it's: java if((PotionType) e.getItem().getType() == PotionType.WATER){ not work?

terse raven
midnight shore
#

and this wouldn't break anything?

terse raven
#

pretty sure

#

stack overflow said so

midnight shore
#

let's say i have double 1.1D and i want a float it would become 1.1F right?

terse raven
crude cobalt
summer scroll
#

You need to get the ItemMeta of the ItemStack and then cast it to PotionMeta

midnight shore
humble tulip
#

Get string parse float?

terse raven
terse raven
midnight shore
humble tulip
#

Why not may i ask

#

I jjst suggested it

terse raven
#

Performance

humble tulip
#

I assume you only get it once right?

crude cobalt
midnight shore
#

there's not a getFloat method tho

terse raven
summer scroll
#

Just use getDouble and then cast it to float

midnight shore
midnight shore
crude cobalt
#

Use this:

 Float.valueOf 
terse raven
#

so who is asking this question now

midnight shore
terse raven
#

just cast it please

midnight shore
terse raven
humble tulip
#

Cast, if it breaks figure something else

iron glade
#

Just in case anyone wants to know, that's how I extracted the schematic from the jar to the world edit folder:

public void extractSchematic()  {

        if(isWorldEditInstalled()) {
            if(!ufoSchem.exists()) {

                try {
                    InputStream stream = getResource("UFO.schem");
                    FileUtils.copyInputStreamToFile(stream, new File(getDataFolder() + "/../WorldEdit/schematics","UFO.schem"));
                    getLogger().info("Ufo schematic has been extracted successfully!");
                } catch (IOException e) {
                    e.printStackTrace();
                }

            }

        }
        else {

            getLogger().info("World edit not found, UFO schematic was not extracted!");

        }

    }```
humble tulip
#

Should u use file.separator?

#

Because of windows and linux

terse raven
#

i think this should work on both

crude cobalt
terse raven
#

check if it has an effect

iron glade
#

after adding worldedit to my pom the output file is 300kb bigger is this normal?

terse raven
#

don't do that

#

world edit will error if you include it in your jar

iron glade
#

I mean I added it as dependency

terse raven
#

could you show me how you added it

humble tulip
#

make sure you have <provided>

terse raven
#

scope needs to be provided

iron glade
#
         <dependency>
            <groupId>com.sk89q.worldedit</groupId>
            <artifactId>worldedit-core</artifactId>
            <version>7.2.10-SNAPSHOT</version>
            <scope>provided</scope>
        </dependency>```
humble tulip
#

that's correct

terse raven
#

then there should be nothing wrong

humble tulip
#

maybe it's something else in your pom

iron glade
#

damn 300kb

terse raven
#

maybe the schematic you added?

humble tulip
#

^^

iron glade
#

I checked and it's raw size is 2kb

crude cobalt
humble tulip
#

open your jar with 7zip or winrar

terse raven
#

can't rn i am on phone

humble tulip
#

and see what's taking the extra spce

crude cobalt
iron glade
#

oh damn

#

found it

#

looks like it's apache commons

terse raven
iron glade
#
        
        <dependency>
            <groupId>commons-io</groupId>
            <artifactId>commons-io</artifactId>
            <version>2.11.0</version>
        </dependency>```
humble tulip
#

that;s it

terse raven
#

yea

iron glade
#

Do I have to add that provided?

terse raven
#

probably not

humble tulip
#

is it in spigot by default?

peak depot
#

someone with github knowlege wanna work on a bungeecord system together?