#help-development

1 messages ¡ Page 1641 of 1

unreal quartz
#

u have the answer there

#

"alphabetical by team name"

#

1st result btw

quaint mantle
#

Why does the args[0] return nothing?
Code:

@Nullable
    @Override
    public List<String> onTabComplete(@NotNull CommandSender commandSender, @NotNull Command command, @NotNull String label, @NotNull String[] args) {
        List<String> tabCompletion = null;

        if (args.length == 1) {
            tabCompletion = new ArrayList<>();

            if (args[0].equals(""))
                for (String completion : new ArrayList<>(Arrays.asList("reload", "create", "remove", "setup", "join", "leave"))) {
                    System.out.println("1: " +completion);
                    System.out.println("2: " +args[0]);
                    System.out.println("3: " +(completion.startsWith(args[0].toLowerCase())));
                    if (completion.startsWith(args[0].toLowerCase()))
                        tabCompletion.add(completion);
                }
            else
                tabCompletion = new ArrayList<>(Arrays.asList("reload", "create", "remove", "setup", "join", "leave"));


            return tabCompletion;
        }

        return null;
    }

Debug:

[15:12:13 INFO]: 1: reload
[15:12:13 INFO]: 2:
[15:12:13 INFO]: 3: true
[15:12:13 INFO]: 1: create
[15:12:13 INFO]: 2:
[15:12:13 INFO]: 3: true
[15:12:13 INFO]: 1: remove
[15:12:13 INFO]: 2:
[15:12:13 INFO]: 3: true
[15:12:13 INFO]: 1: setup
[15:12:13 INFO]: 2:
[15:12:13 INFO]: 3: true
[15:12:13 INFO]: 1: join
[15:12:13 INFO]: 2:
[15:12:13 INFO]: 3: true
[15:12:13 INFO]: 1: leave
[15:12:13 INFO]: 2:
[15:12:13 INFO]: 3: true
unreal quartz
#

becaue youve checked it contains nothing?

quaint mantle
#

Ohh I forgot the !

#

Sorry my bad

tardy delta
#

after deserialisation i guess

narrow furnace
#

nice

tardy delta
#

well maybe @unreal quartz is right that the nulls dont matter

#

only a big file

narrow furnace
#

so it doesnt work without nulls?

tardy delta
#

it does

#

thats why i save the index

sand rune
#

@unreal quartz
Okay I see it , so I have to put In the setPlayerList these numbers or no ?

unreal quartz
#

wat

#

the team names determine the order here, so if i am in a scoreboard team with the name "a" i will be placed higher than someone in the team "z"

sand rune
#

Oh in the registerTeam("0")
is higher than
RegisterTeam("1")

#

@unreal quartz

unreal quartz
#

if those are the team names then yes

sand rune
#

Yay ! Thx for ur help @unreal quartz

smoky oak
#

How can I see if someone joins for the first time?

#

lol nevermind there's a check for that

tardy delta
#

if (!player.hasPlayedBefore())

#

oh you already have

tardy delta
#

for some reason this gives a nullpointer

private final Inventory inv = Bukkit.createInventory(p, 45, p.getName() + "'s safechest");
#

?paste

undone axleBOT
ivory sleet
#

p can be null

tardy delta
#

i tried with other commands that would throw an error if p was null

#

and they work

ivory sleet
#

send your code

#

well if thats called too early in the server bootstrap process maybe Bukkit::createInventory invocation caused it

#

though unlikely

tardy delta
#

i had an exception ininitializerError before

#

when my inventory was static

#

then i changed it

ivory sleet
#

idk

#

its a lot easier if you'd disclose some code

lyric grove
#

im experiencing this issue

#

im using this

tardy delta
#

commandsafechest:17 is that line

ivory sleet
#

stacktrace wont help jack shit

#

as said 2 times already, too further investigate your error, code is probably the best way of addressing it

#

and no, no one is going to skid it

narrow furnace
#

?paste

undone axleBOT
tardy delta
#

it starts by this
getCommand("safechest").setExecutor(new CommandSafechest());

ivory sleet
#

the command instance might be null

#

that is if you didnt declare it in your plugin manifest

tardy delta
#

i did

ivory sleet
narrow furnace
#

@tardy delta why cant u send code?

ivory sleet
#

yeah well from the stacktrace it seems like its in the constructor of CommandSafechest

tardy delta
#

there is litterly nothing i can send

#

there is no constructor

narrow furnace
#

how can we help you if you cant give us anything?

ivory sleet
#

bing people here are usually quite paranoid over there code 🤷 at the end its their decision

lyric grove
ivory sleet
#

suggestion one, don't use static singletons all over the place, pass dependencies through constructors and methods

tardy delta
ivory sleet
#

send the BaseCommand

tardy delta
ivory sleet
#

makes sense you'd get a npe

lyric grove
#

anyone know what i should do?

ivory sleet
#

BaseCommand.p is null at the time CommandSafechest.inv uses BaseCommand.p

ivory sleet
#

?paste thx

undone axleBOT
tardy delta
#

it calls the validate method before the use of a command no?

#

wew

ivory sleet
#

yes but fields are initialized when the new Class(); is called

#

they're not initialized when you want sadly, as said they follow an order

lyric grove
tardy delta
#

i made p static to test something ..

#

lets undo it

lyric grove
#

and this is the inventories config, i dont see whats wrong xd

ivory sleet
#

the main plugin class also

lyric grove
#

this is the code causing the error

#

line 134

ivory sleet
#

I want the entire class

#

you couple your code so we cant tell by that merely

lyric grove
tardy delta
#

brr the error is back

ivory sleet
#

Yes I told you the issue

#

the variable p will not become not null on your command

tardy delta
#

and for other commands it does?

ivory sleet
#

yes but you're literally using the p variable when its null

#

its an irrefutable fact, just look at your code. But let me ask this rather, what are you trying to do?

ivory sleet
tardy delta
#

just letting the command work it worked before

ivory sleet
#

and then you obviously changed something which broke it because your code is fragile

#
//BaseCommand

    protected final Main plugin = Main.getInstance();
    protected boolean isConsole = false;
    protected CommandSender sender = null;
    protected static Player p = null;
    protected final List<String> arguments = new ArrayList<>(); // tabComplete
    protected final Map<UUID, Long> cooldowns = new HashMap<>();

//Safechest

    private static final Map<UUID, ItemStack[]> menus = new HashMap<>();
    private final Inventory inv = Bukkit.createInventory(p, 45, p.getName() + "'s safechest");
#

look here

#

p = null

tardy delta
#

yes

ivory sleet
#

its not going to turn not null at the initialization of inv

tardy delta
#

oh wew got it

#

idk why it worked before tbh

ivory sleet
#

probably because you did something different

ivory sleet
#

the stacktrace shows another line

#

actually

#

its probably lombok

lyric grove
#

oh

ivory sleet
#

myes the dark arts of lombok shows itself once again

crimson terrace
#

Hey does anyone know how you can include a specific potion (like Potion of Invisibility 8:00) in a recipe? I need it for a shaped recipe.

tardy delta
#

nms probably

ivory sleet
#

pengu can you run delombok and regenerate the stacktrace

tardy delta
#

wew error is gone

tardy delta
lyric grove
ivory sleet
#

good

#

remove lombok, its not really meaningful anyways

#

imo at least

opal juniper
#

i don’t like it

tardy delta
#

full form??

opal juniper
#

it normally just screws shit up

tardy delta
#

the minecraft part of the game

#

instead of bukkit

narrow furnace
#

minecraft is the entire game 🤔

tardy delta
#

damn this explenation sucks

ivory sleet
#

it causes dependency complexity for no real beneficial reason arguably jeff, only good thing is that it actually decreases boilerplate and verbosity

tardy delta
#

i mean the server

narrow furnace
#

net.minecraft.server

#

n.m.s

#

nms

vivid temple
#

how would i go about sending a message in chat only when they leave the area and not everytime they are outsite the area?

opal juniper
#

wel

ivory sleet
#

j16 nice?

opal juniper
#

i had some issues with it in the past at least

ivory sleet
#

Yeah

opal juniper
#

waits

#

for what?

#

xD

#

no you don’t

#

it is not documented

#

you probably found some shit wayyy out of date

#

?

#

do you mean the javadocs?

ivory sleet
#

oof

#

that one is kinda outdated

opal juniper
#

out of date

vale cradle
opal juniper
#

there isn’t one

vale cradle
#

waaaay outdated lol

ivory sleet
#

lmao ancient to say the least yeah

vale cradle
#

On mojang hq :D

#

DIY

opal juniper
#

play about with it

#

do you use intellij?

tardy delta
#

🤔

vale cradle
#

net.minecraft.server

#

All classes under that package

ivory sleet
#

Some say it stands for native minecraft source also lol

vale cradle
#

:0

#

Just realized now

opal juniper
#

if you type “net.minecraft.server.”

ivory sleet
#

yeah goes hand in hand

opal juniper
#

and then you can see all the imports

amber vale
#

How can I cancel opening the enchantment table gui, and after that opening a custom gui? I know how to open a gui, but idk how to check when the enchanting gui is opened and cancel that?

tardy delta
#

event

hexed hatch
tardy delta
#

and open a new inventory

#

UwU

ivory sleet
#

its a package

amber vale
tardy delta
opal juniper
#

just in a method

hexed hatch
#

and then make it open your own ui

tardy delta
#

what is the pitch in player.playsound?

#

:/

hexed hatch
tardy delta
tardy delta
hexed hatch
#

the acceptable range is >0 - 2

#

1 is normal

tardy delta
#

maybe thats why my villager sound sounds that weird

hexed hatch
#

I believe the default is 3?

tardy delta
#

i guess 4

hexed hatch
#

Just checked, it's 3

tardy delta
#

whaha

#

smh

hexed hatch
#

good luck with that

tardy delta
#

isn't this the singleplayer sound from a villager that declines your trade?
Sound.ENTITY_VILLAGER_NO

#

it sounds weird

hexed hatch
amber vale
#

Ok so I can't figure out how to detect if the player is interacting with the ench table+

tardy delta
amber vale
#

Ok so I can't figure out how to detect if the player is interacting with the ench table

hexed hatch
tardy delta
#

event.getinv.gettype == invtype.enchantmenttable or something?

#

oh

#
if (event.getInventory().getType() == InventoryType.ENCHANTING)
#

shouldn't this work?

hexed hatch
#

no

#

There's no getInventory method for player interact event

tardy delta
#

inventoryopen

#

inventoryclick i mean

#

oh no then it is already opened

hexed hatch
#

Probably less janky to cancel the inventory opening at all before opening the custom one

tardy delta
#

nvm

hexed hatch
#

He's trying to hijack the enchantment table ui altogether

amber vale
#

Oh it works now

#

tty

stone sinew
#

Try delaying it...

hexed hatch
#

Delay that by one tick

#

?scheduler

#

Ugh

ivory sleet
#

?scheduling

undone axleBOT
hexed hatch
#

thanks daddy

ivory sleet
left swift
#

what will this line look like using nms 1.17? I mean ADD_PLAYER

PacketPlayOutPlayerInfo.EnumPlayerInfoAction.ADD_PLAYER```
opal juniper
#

idk

#

best thing to do is to remap a jar with buildtools and then decompile it

#

imo at least

#

sure you can

#

use something like fernflower

hexed hatch
#

decompile it

opal juniper
#

^

#

fernflower comes bundled with it

hexed hatch
#

then get some glasses lol

#

fernflower is a good one

#

procyon is what I usually use

opal juniper
#

usage in teh readme

tardy delta
#

jd gui is better

opal juniper
#

basically there are a million ways to decompile - when you open a .class with intellij it uses fernflower on that specific class. however you can manually decompile entire jars

#

a zip??

#

i got no clue

#

oh xD

#

that’s not what i meant

#

so like

#

do you have something like 7zip installed?

#

ok - so open the jar with 7zip

#

and you should have a tonne of .class files

#

that are unreadable

#

because they are in bytecode

#

ok

#

so then open one of them with intellij

#

it should decompile it

tardy delta
#

now trying to understand the java code tududu

tardy delta
#

pog why is player.getinventory().remove() not a boolean : (

eternal oxide
#

you can use all to test if there is anything to remove.

lost matrix
#

You cant make them truly hostile.

eternal oxide
#

true, a boolean would make sense.

prisma needle
#

When I modify a GameProfile of a player, how can I update that GameProfile for the modified player? I figured out how to make other players see the updated player, but not the player itself...

lost matrix
#

You can either disguise a hostile mob as a non-hostile one or you can try and extend the NMS mob to make it hostile with some logic

lost matrix
#

You cant. A Spider has no Equipment slots

#

You can also just increase the spiders armor attribute. Not sure if that works tho.
Then you can also write your own attribute system thats based on PersistentDataContainer.

#

It doesnt work like that

#

I dont think you can just increase the health above the entities maximum health like that.

#

You need to set its GENERIC_MAX_HEALTH attribute

hybrid spoke
#

check if the #getEntity is instanceof Spider instead

ivory sleet
hybrid spoke
#

it is

wild reef
#

Hey quick question, I wanted to start my dev server for some testing but I am getting this error on start:

#

Anyone saw that before? Could it be in relation with that white server pop up window? -> could I disable it?

hybrid spoke
#

yeah

#

-nogui

wild reef
#

yea true sorry, just used to be in this channel 😅

hybrid spoke
#

probably a start option wrong or stuff

restive hull
#

any good reduce lag plugins?

opal juniper
#

also

#

yeah

restive hull
#

ok

opal juniper
#

there is a command called “stop”

#

it gets rid of all lag

lost matrix
#

A good server configuration does half the job

restive hull
#

hmm its a paper server

lost matrix
#

And most "anti lag" plugins have no idea what they are doing and even introduce more lag sometimes.

opal juniper
#

they mostly just degrade the experience

#

like despawning ground items sooner

restive hull
#

yea

#

How we configure it so lag is reduced as much as possible

opal juniper
#

a good plugin is the lobotomizatornator

lost matrix
#

?lag

opal juniper
#

xD

restive hull
#

?

lost matrix
#

Wait... wasnt there a command for that?

opal juniper
#

spigot doesn’t lag

restive hull
#

its paper

opal juniper
#

md doesn’t believe in there being lag

#

in spigot

dusk flicker
#

ask in the paper discord then

opal juniper
#

^

restive hull
#

ok is there a link?

lost matrix
eternal night
#

might also help

opal juniper
#

air

lost matrix
opal juniper
#

xD

#

hahah

#

i cannot send the discord invite for paper

#

some bot is deleting it

restive hull
#

private

lost matrix
#

XD

#

As expected

opal juniper
#

md got his pants in a twist

#

anyways it is /papermc @restive hull

restive hull
#

/papermc

#

?

opal juniper
#

no the link

restive hull
#

oh ok

opal juniper
#

without the spaces

restive hull
#

ty mate

ivory sleet
opal juniper
#

hehehehe

#

conclure

#

do you know why there is a bot deleting links to the paper discord

dusk flicker
#

it removes all invites

opal juniper
#

it does?

eternal oxide
#

You can;t advertise McDonalds in a KFC

dusk flicker
#

yep

opal juniper
#

i swear i have seen others before

#

see

dusk flicker
#

hmm

#

I know some get deleted

#

regex is prob shit on it\

opal juniper
#

doubt

quaint mantle
#

PU_peepoEyeRoll Advertising motorcycles in a car shop

opal juniper
eternal oxide
#

Why?

opal juniper
#

idk

#

to delete the links

eternal oxide
#

shoudl we just put a redirect on spigot to there?

opal juniper
#

seems a bit extra

dusk flicker
#

for example on some links that get deleted even the spigot invite is deleted

ivory sleet
#

jeff ma boi

#

do that in dms

opal juniper
#

what?

ivory sleet
#

helping him joining the paper discord ye

opal juniper
#

ok…

#

in other news why is discord mobile shit

ivory sleet
#

lmao

#

whats so bad about it

opal juniper
#

group the messages

#

it does it with replies as well

#

it’s so annoying

ivory sleet
#

oh lol

quaint mantle
#

its grouped for me

opal juniper
#

bruh

#

again

#

demonstrating the issues

#

?

#

what about it

#

that is how you declare something

eternal night
#

wat

opal juniper
#

????

eternal night
#

?events

#

?event

#

or not

opal juniper
#

?event-api

#

uhh

eternal night
#

we tried 😭

opal juniper
#

?scheduling

undone axleBOT
opal juniper
#

ok so it ain’t broken

eternal night
#

that isn't even how you setup an event listener 😭

opal juniper
#

^^

eternal night
#

oh

#

you are more asking, why is there no player block break event

opal juniper
#

ok so what is the error?

eternal night
#

like, the event is just called BlockBreakEvent xD

#

idk what your issue is

#

loool

opal juniper
#

i’m still so confused what just happened

eternal night
#

I believe they were looking for an event that simply wasn't named that

opal juniper
#

riiight

#

now wtf is this command

quaint mantle
#

prone to change

lost matrix
tardy delta
#

👍

eternal night
#

ah yes because spigot PRs are pulled in a few days 😭

lost matrix
#

XD

quaint mantle
tardy delta
#

nope

opal juniper
#

took 4 days

#

then it was merged

quaint mantle
#
if (player.getInventory().removeItem(item).isEmpty()) {

}

@tardy delta

eternal night
#

👀

#

impossible

opal juniper
#

i didn’t make it

#

sorry typo

#

someone made it for something i was doing

#

but yeah

#

it was fast

lost matrix
quaint mantle
#

make your own

opal juniper
#

had to compile myself smh

tardy delta
eternal night
#

for the new generator api ?

opal juniper
#

nono

quaint mantle
lost matrix
tardy delta
#

the itemstack you specified yes?

opal juniper
#

it was just a random like issue with chunksections

quaint mantle
#

yes

quaint mantle
eternal night
tardy delta
#

The returned HashMap contains what it couldn't remove,

#

i don't need it

quaint mantle
#

Does someone knows a way to send your files from the server automatically to github each hour?

tardy delta
#

ah i understand how it works

quaint mantle
#

loop every hour, git commit, git push

opal juniper
quaint mantle
#

or if your server host is shit you can make a plugin

tardy delta
quaint mantle
tardy delta
#

thats the thing i wanted

#

😄

eternal night
#

idk, to this day I have no idea why a project like spigot that does rolling releases believes every single API addition is final.

opal juniper
#

compatibility

eternal night
#

but mid version ?

opal juniper
#

i know why

#

but yeah

eternal night
#

developers would actually have to re-pull their spigot dependency then use the new feature

opal juniper
#

it’s annoying when shit gets broken though

eternal night
#

Yes between version upgrades sure

quaint mantle
eternal night
#

but when you are developing on the edge anyway

quaint mantle
#

use a plugin

opal juniper
#

myeah true

#

meh

quaint mantle
opal juniper
#

i always hate it though when an api gets re-written cause it changes all the methods

quaint mantle
opal juniper
#

screws up tutorials as well

eternal night
#

like, all added methods were deprecated

opal juniper
#

👀

eternal night
#

potential subject to removal

opal juniper
#

that’s kinda cool

eternal night
#

and people could just build prototypes etc

#

developers also knew it was draft, it might change. your own risk of using it

opal juniper
#

yeah - why did it go?

quaint mantle
#

so if i would use it with bash, so in a .sh file how can i let that run

eternal night
#

idk /shrug. it wasn't anything official. but current additions are just thrown in

#

e.g world generator overhaul

opal juniper
#

yeah

eternal night
#

huh ?

narrow furnace
quaint mantle
narrow furnace
#

oh in pterodactyl idk

quaint mantle
#

f

narrow furnace
#

do you have access to a terminal

tardy delta
#

¯_(ツ)_/¯

quaint mantle
#

is there any way to detect player pressing the movement keys while spectating someone?

young knoll
#

No

tardy delta
#

you can detect player movement

quaint mantle
narrow furnace
#

idk if it will work from there

tardy delta
#

combine that with checking the gamemode

narrow furnace
#

but to make a script executable its

quaint mantle
narrow furnace
#

and then to run it is

tardy delta
#

oh no

narrow furnace
#

./script.sh

quaint mantle
#

okay but there are plugins to execute shell scripts and bash scripts

unreal quartz
#

soo use the plugin then

eternal night
#

else, java's Process API should allow you to execute scripts

vivid temple
#

how do you check if the hotbar contains an item?

tardy delta
#

if (inventory.contains(item))

#

and for the hotbar you need to check the index i think

vivid temple
#

thanks

quaint mantle
tardy delta
#

for some reason does player.getInventory().remove(item) do nothing

#

ah do i need to call updateInventory

prisma needle
tardy delta
#

cant you hide yourself for yourself?

#

lol

prisma needle
#

unfortunately no

tardy delta
#

but what's the problem?

wild reef
#

Hey there, is there an easy way to get the world location of an specific location inside a chunk?

  • like inside the chunk x: 1 represents x: -18 in the world location

  • or getting the start and end location (world location) from an chunk

prisma needle
#

everyone else can see the updated player GameProfile, except the player himself

tardy delta
#

hmm

#

for some reason this wont remove the item

if (player.getInventory().containsAtLeast(item, 1)) {
                    player.getInventory().remove(item);
                    player.updateInventory();
eternal oxide
#

remove the updateInventory and allow your code to finish

restive tangle
#
            double y = plugin.getConfig().getDouble("y");
            double z = plugin.getConfig().getDouble("z");
            World w = Bukkit.getServer().getWorld("world");
            plugin.getServer().getScheduler().scheduleSyncDelayedTask(plugin, new Runnable() {
                @Override
                public void run() {
                    p.teleport(new Location(w, x,y,z));
                    p.sendMessage(ChatColor.GOLD + "HERESY " + ChatColor.GRAY + "| Successfully teleported to " + ChatColor.GOLD + "spawn");
                    p.playSound(p.getLocation(),Sound.ORB_PICKUP,1,1);
                }
            },100);``` i dont get any errors but it tps me to 0 0 not the actual coordinates
young knoll
#

Check your config

restive tangle
#

i did ,
~Spawn: x: -13 y: 65 z: -225

#

it works fine

#
   plugin.getConfig().set("Spawn." + ".x", p.getLocation().getBlockX());
   plugin.getConfig().set("Spawn." + ".y", p.getLocation().getBlockY());
   plugin.getConfig().set("Spawn." + ".z", p.getLocation().getBlockZ());
   plugin.saveConfig();```
unreal quartz
#

plugin.getConfig().getDouble("x");

#

this concatenation is pointless and you have put 2 dots in your path

restive tangle
#

fixed it

#

my path was wrong , i had to add Spawn.

unreal quartz
#

yes

quaint mantle
#

not following YAML naming conventions whyy2

crimson terrace
#

theres conventions?

#

oh crap

restive tangle
#

what?

crimson terrace
#

🙃

unreal quartz
#

yes all your keys need to be written in SpOngECaSe

quaint mantle
#

^

restive tangle
#

B

quaint mantle
#

mYsPaWnLoCaTiOn:

quaint mantle
#

its dash-case

#

for python its lower_snake_case

#

for some reason

crimson terrace
#

so if I wanna get the skeleton spawn chance I have to write "skeleton-spawn-chance"

quaint mantle
#

no

crimson terrace
#

skeletonSpawnChance?

quaint mantle
#

its just conventions, barely any plugin devs follow them

crimson terrace
#

oh ok then, dont have to rewrite 400 lines. thank god.

unreal quartz
#

there is no such thing as a yaml naming convention

#

there is nothing in the specification which suggests there is

quaint mantle
#

why do you always wanna disagree with me

restive tangle
#

a little tomfoolery

crimson terrace
#

Ive got a question about shapedRecipe if someone knows their way around it

quaint mantle
#

great

reef wind
#

but "XXX" "XXX" "XXX"

crimson terrace
#

How would I add a specific potion as an ingredient?

reef wind
#

oh

crimson terrace
#

for example I want to add a splash potion of invisibility

quaint mantle
#

new RecipeChoice.ExactChoice

#

for some reason its deprecated

reef wind
#

check docs for the replaced

quaint mantle
#

is it not deprecated anymore?

reef wind
#

there might be a replacement?

crimson terrace
#

and how would I get the exact Potion in an ItemStack?

surreal sonnet
#

How to create custom loot tables?

quaint mantle
#

like drops?

reef wind
surreal sonnet
#

chest items

reef wind
#

or you could assign a block to be a crafting table by doing some command or shit or and then open a gui when you right click it.

quaint mantle
#

desk what you on about

reef wind
#

wat

#

he wants to create a custom crafting table

quaint mantle
#

thought he meant chest loot tables

reef wind
#

what?

quaint mantle
reef wind
#

loot tables?

quaint mantle
#

@surreal sonnet explain

reef wind
#

what is a loot table

#

a lottable table?

surreal sonnet
#

I'm currently trying to create an custom loottable to set some items like golds, gapples etc. in it, but it only shows a empty gui rn

quaint mantle
#

huh

reef wind
#

do you mean a crafting table?

quaint mantle
#

where did he say crafting table

reef wind
#

WHAT is a loot table?

quaint mantle
reef wind
quaint mantle
surreal sonnet
#

just using "implements LootTable" and myLootTable.fillInventory right now

quaint mantle
#

😲

#

Is this new?

reef wind
#

never heard of that

quaint mantle
#

me neither

reef wind
#

?paste pls

undone axleBOT
reef wind
#

?paste pls

undone axleBOT
young knoll
#

I did not know you could make custom loottables

crimson terrace
#

Thanks, the "new RecipeChoice.ExactChoice()" worked perfectly 😄

surreal sonnet
quaint mantle
reef wind
#

sounds fun

quaint mantle
tropic kelp
#

Hey, I want to damage a Monster with:
((Monster) loop).damage(10.0D);
but I want, to calculate the sword of the player and the armour and effects of the mob.

crimson terrace
#

are you using a Listener or something like that to activate it?

hybrid spoke
#

not needed

#

its a bit hacky

surreal sonnet
reef wind
quaint mantle
reef wind
#

not what I meant

#

I asked if he is want's to change the damage based on the sword

restive tangle
#

I am using hashmaps to see if a player moved after doing a command , if they do i listen to it and then set it to false so it will cancel what it was going to do but it does not seem to be doing that

    @EventHandler
    public void onMove(PlayerMoveEvent e){
        Player p = e.getPlayer();
        if(Cmds.spawnTimer.containsKey(p)){
            Cmds.spawnTimer.put(p,false);
            return;
        }
    }
    public static HashMap<Player, Boolean> spawnTimer = new HashMap<Player, Boolean>();
            if(spawnTimer.get(p) == false){
                p.sendMessage(ChatColor.RED + "Teleportation cancelled , you moved");
                return true;
            }```
tropic kelp
young knoll
tropic kelp
restive tangle
#

UUID?

quaint mantle
#

Yes

restive tangle
#

ok

surreal sonnet
restive tangle
#

i changed it to the players UUID but i need it to actually work

restive tangle
#

no , not really

quaint mantle
#

you need to remove the key

#

you are checking if it contains, not if it is false

restive tangle
#

do i see if its true and then do the rest

hybrid spoke
#

negiate it

restive tangle
#

hm?

#

the moveevent works , but it does seem to be doing anything

#

they are in different classes so it might be the reason

pulsar gust
#

Hi guys, please help. I can't find a single functional PHATLOOTS style plugin for minecraft version 1.17.x Is there anything similar available? Unfortunately, I can't do without it. An ordinary plugin for loot chests would be enough.

minor garnet
#

some know how to do a tablist prefixes priority ?

hybrid spoke
#

0-9 a-z

#

or

#

what do you mean?

minor garnet
#

its because i'm creating a custom tab

hybrid spoke
#

yeah well

#

but what do you mean by priority

minor garnet
#

then i would have to set players manually, so I would have to get all online players and add a specific player's tab

#

priority = your tags like [Owner]

#

in that it would always have to be the first

#

until the order of player names

|- abc
|- cba
|- def

understand

restive tangle
#

godcipher what did you mean by "negiate it"

hybrid spoke
hybrid spoke
#

0 will be the first

#

00 will be above 0

minor garnet
minor garnet
#

i need define it manual

tropic kelp
#

How can I set the AttackCooldown to Maximum. There is already the resetAttackCooldown method.

earnest lark
#

what is entity cumbust event and how do i cumbust a entity?

unreal quartz
earnest lark
#

exactly

#

oh is there a playerdamageevent

#

i need to know

versed bane
#

can someone help me with making an npc invisible using protocollib?

#

or is there another discord for that

earnest lark
#

look it up

hexed hatch
versed bane
#

i have but it creates an error

#

i've managed to send any other packet

earnest lark
versed bane
#

but anything related to nms enums will just not work

hexed hatch
#

?javadocs

#

?docs

#

?documentation

versed bane
#

i have checked those

hexed hatch
#

for fuck's sake

versed bane
#

i have copied the examples

#

it just doesn't work

#

am i forgetting a dep?

versed bane
#

protocollib

earnest lark
versed bane
#

ok

#

sorry

earnest lark
#

i dorget how do i register a event in the main class

versed bane
#

do you have a class that extends Listener?

#

such as an EventListeners class

earnest lark
#

nvm i go tit

versed bane
#

👍

quaint mantle
quaint mantle
#

Guys whenever i cmd+shift+o on eclipse my imported plugins have random spaces between them on default. Im a newbie does this mean something, can i delete the spaces in between?

import org.bukkit.command.CommandSender;
import org.bukkit.plugin.java.JavaPlugin;

import com.mojang.brigadier.Command;

crisp arch
#

how can i get the entity killer on a PlayerDeathEvent?

#

?

#

this is my current code, but if its an entity, attacker returns null

Player victim = e.getEntity();
Player attacker = victim.getKiller();
#

ok ill try it out

spark zealot
#

Are the new data values referred to by org.bukkit.Material? These are the integers referring to each item correct?

crisp arch
#

nope, the javadoc for getKiller is still

Gets the player identified as the killer of the living entity.
May be null.
spark zealot
spark zealot
#

Yeah I was so confused by the minecraft wiki namespaces

crisp arch
#

?

#

ok ill try EntityDeathByEntityEvent

#

the class or is this an event!?!!

#

because it doesn't exist

crisp arch
#

no results :/

#

congrats but not for me lmfao

#

oh i found it

#

you misspelt it 😠

#

welp i guess ill use it and see what happens

#

thx

#

oh wait yea hm

#

uh

#

is there no way to get the killer entity for a death event?

#

i-

unreal quartz
#

get the last damage cause and check it's an instance of entityt damage by entity

crisp arch
#

:O thats actually big brain

#

thx

solid cargo
#

hello, how can i set a custom follow range for a custom entity

crisp arch
unreal quartz
#

yes

crisp arch
#

kkkk pogggerrrss

solid cargo
#

F

#

WRONG THING

quaint mantle
#

hey

#

soooo

solid cargo
#

there

quaint mantle
#

is there any reason a HashMap isnt being set?

#

its all good

#

it runs, right

solid cargo
quaint mantle
#

the hashmap doenst set though

#

tpaPlayerSpecific isnt being set right

#

im not sure

#

its a HashMap<Player, Player>

#

UUID?

#

alr

#

iw as thinking of that lmao

#

ohhh

#

weird

#

idk haha

#

yeah its still not working

#

here's the error from doing /tpaccept

#

and like i said /tpa does work, right

solid cargo
#

eh

#

just decompile essentialsX

#

boom

quaint mantle
#

yes

#

tpaccept has no args

#

because it checks the hashmaps

#

oh yeah

#

tpa works, i changed it to be .getUniqueId()

#

just not tpaccept..

#

p is specified as (Player) executor

#

in the onCommand

solid cargo
#

not a spigot pro or anything, but read the code, and check if everything goes correctly

#

i mean like

#

if its in correct order

#

and stuff

quaint mantle
#

its at line 199

#

when i made the weird tpa HashMap that i'm probably going to change

#

it just checks UUID1:UUID2 is true

sacred ice
#

Hello, I have a question? I am allowed to do a plugin that update itself without restarting the server whenever a new update is available? There will be an config boolean like 'auto-update: true' new version of the plugin will be downloaded on start and replaced by the old one(set as true by default).

quaint mantle
#

above that, tpaTo is set to Bukkit.getPlayer(the hashmap value);

#

so irdk

#

that runs in-game

#

i did /tpa AnkleDev

#

i got the message

#

theres no errors either in /tpa

#

ya

#

anyone know what im doing worng

#

wrong

quaint mantle
#

!condition

#

fair

#

what else

#

what else.

#

is there any reason the hashmap wouldnt be setting

#

or nulling

#

for some reason

#

you want to make a tpa command

#

sĂ­

#

i type too slow for this

#

on phone

#

rip

#

is there a cooldown for moving

#

no

#

just /tpaaccept

#

yes

#

whats key

#

its

#

really weird id kwhy i still have it

#

its their uuid to a string

#
  • ":" + the otehr uuid
#

so basically

#

uuid1:uuid2

#

idk how that makes it not work if we're talking about a completely different hashmap @weary geyser

#

i'll remove that hashmap though haha

#

afaik it doesnt really serve any purpose

#

you should use a bimap

#

or create a TpaRequest object

#

accept
request

#

nvm

#

away from home, havent coded anything in weeks

#

@quaint mantle you're overcomplicating it

#

consider a recode

quaint mantle
#

i'll do that haha

#

i removed the "UUID:UUID" hashmap

#
map uuid, uuid

tpa player:
    map.put(to.uuid, player.uuid)

tpaaccept:
    if map.contains(player.uuid):
        map.get(player.uuid).teleport(here)
#

thats another way

#

im basically doing that, i'll do that again

#

niw*

#

i'll do that now*

#

but still id use a manager object to account for cooldowns

#

ew

#

i dont really want cooldowns tbch

solid cargo
#

how can i code for 1.8, if intelij offers from 1.12

sacred ice
#

Hello, I have a question? I am allowed to do a plugin that update itself without restarting the server whenever a new update is available? There will be an config boolean like 'auto-update: true' new version of the plugin will be downloaded on start and replaced by the old one(set as true by default).

quaint mantle
#

i think you can

#

as long as its togglable

solid cargo
#

stupid question but how

sacred ice
#

oki ty

solid cargo
#

ahh

#

in pom.xml?

#

and then restart

quaint mantle
#

1.8 🤮

solid cargo
#

ik

quaint mantle
solid cargo
#

whats so bad abt it

quaint mantle
#

its bad

solid cargo
#

yeah but whats bad

quaint mantle
#

yeah @quaint mantle for some reason the hashmap still isnt setting

#

i have my conds at the top to make sure they are suitable for stuff

#

but tpaPlayerSpecific.... isnt being "put"

#

theres no need - Player tpaTo is set

#

there's a message that has their displayname in it

#

which means, obv they're a player and they're good

#

oh

#

yes

#

thats so weird why wouldnt it be setting

#

yeahhhh

#

so

#

still nothin

frigid falcon
#

Hey I got some problems with maven and spigotmc I'm using the repository and dependency from the pom.xml from the official spigot forum for spigot 1.8.8 but I can't get get the dependencies, I always get this error: Failed t collect dependencies at org.spigotmc![spigot](https://cdn.discordapp.com/emojis/728421352721088542.webp?size=128 "spigot")jar:1.8.8-R0.1-SNAPSHOT: Failed to read artifact descriptor for org.spigotmc![spigot](https://cdn.discordapp.com/emojis/728421352721088542.webp?size=128 "spigot")jar:1.8.8-R0.1-SNAPSHOT: org.spigotmc:spigot-parent:pom:dev-SNAPSHOT was not found in https://oss.sonatype.org/content/groups/public/ during a previous attempt. This failure was cached in the local repository and resolution is not reattempted until the update interval of sonatype has elapsed or updates are forced -> [Help 1]

#

?

solid cargo
#

how is the 1.7 maven thing called

quaint mantle
#

so

#

any idea why the hashmap key isnt being set

#

or put

#

or whatever

#

there's literally no reason it wouldnt be being set

#

or put or whatever

#

im getting the message

#

"You have sent a teleport request..."

#

etc.

sacred ice
#

so then it contains I guess

#

try to get and print

#

mb

quaint mantle
#

i did

#

for(UUID s: tpaPlayerSpecific.values())

#

nothing

#

like its not being set??

sacred ice
#

the value is null?

quaint mantle
#

yeah

sacred ice
#

can i see the tpaPlayerSpecific hashmap?

#

variable when you define it

quaint mantle
sacred ice
#

have you tested it define it has new HashMap<UUID, UUID>();

quaint mantle
#

i'll do that

#

i didnt think that mattered,,, because i'Ve always seen it as just new HashMap<>

#

but i'll try it!!!

#

anythings worth a try :D

native nexus
#

Send the full code snippet

#

?paste

undone axleBOT
torn oyster
#

how do i send a plugin message

#

and get an int

#

from a plugin

#

like how many players are left in a minigame

#

via bungeecord

quaint mantle
#

yeah HashMap<UUID, UUID> is a no-go in defining it

solid cargo
#

how is the maven thing for 1.7 called?

#

this seems not to be recognized

#

i did

quaint mantle
#

also didn't work

#

¯_(ツ)_/¯

#

super weird

solid cargo
#

any else ideas sysdm?

quaint mantle
#

why a hashmap value isnt being set

solid cargo
#

i tried on spigot

#

same shiz

quaint mantle
#

LMAO

solid cargo
#

uh oh

#

same stuff, if the project is on spigot

vast sapphire
#

Ok I can't for the life of me find an answer to this, I need to store a hash map with <String, Location> to the config and I have been looking on how to do this for a week, I looked at every bukkit tutorial and couldn't figure it out still. Here is my code https://paste.md-5.net/ewehajojil.java
Can somebody please help me /:

native nexus
left swift
#

how can i make tablist suffix/prefix without scoreboard teams?

solid cargo
#

guys im going to sleep its 00:30

#

bye

native nexus
#

@vast sapphire I don't think you are understanding the concept of configuration sections

solid cargo
#

still can stay up a bit

#

any workarounds

#

how can Minikloon code for 1.7

#

hes a diff breed?

#

oki

#

is it executable?

#

with gui

#

nvm

#

like

#

oh

#

where do i place the jar file?

#

above src?

#

replace install-file with the files name?

#

ah so

#

C:/user/desktop/filename?

#

i ran it in terminal

#

ok

quaint mantle
#

use maven

#

it will automatically download the dependency

solid cargo
#

Ok will do tmr

#

Im bored asf

#

I meant tired

unreal quartz
#

but it isn't

quaint mantle
unreal quartz
#

nope

quaint mantle
#

Whattt

#

that one bukkit dev is poopy

#

what a shithead

unreal quartz
#

disagree

#

would you like to have spent 2 years of your life doing unpaid work for mojang?

quaint mantle
#

yes

#

take their money

unreal quartz
#

that's the thing

#

you're not taking their money

#

you're making them money

quaint mantle
#

then sue them

unreal quartz
#

what do you think he was doing

quaint mantle
#

why dont they just do a recode

unreal quartz
#

because he was one of the major contributors to bukkit

#

like 10k lines or something like that

quaint mantle
#

bukkit is in mojang?

unreal quartz
#

why remake it all when buildtools is now a thing

quaint mantle
#

yes

graceful turret
#

guys is there a way to hide "orginal/copy etc." lore in itemstack?

ivory sleet
#

yes

#

ItemMeta

#

iirc

#

no

#

ItemFlags

#

yes

graceful turret
#

but which one man?

#

HIDE ATTRIBUTES only hides author

ivory sleet
#

HIDE_POTION_EFFECTS

#

can be this one

#

because that one is a bit odd from the others

#

it does a lot more than what the name suggests

graceful turret
#

really?

#

wtf

ivory sleet
quaint mantle
#

hey is it possible to remove players frm the playercount in the serverlist

#

so there's 10 players on (example), someone looks at the server via multiplayer tab

#

and it shows 8 players or 7

#

how could i achieve that

sullen marlin
quaint mantle
#

yeah, should i use iterator?

sullen marlin
#

'Called when a server list ping is coming in. Displayed players can be checked and removed by iterating over this event.'

quaint mantle
#

if so,,, how do i use the iterator for that

#

yeah

#

i've actually tried the iterator and it didnt work

#

i.e; it just kept leading me back to an error like "Cannot parse as player" or something

#

it basically couldnt identify the iterator as a player

sullen marlin
#

Iterator<Player> iter = event.iterator(); while (iter.hasNext()) Player p = iter.next(); if (shouldRemove(p)) iter.remove()

quaint mantle
#

oh i was doing it wrong

quaint mantle
#

md_5, md i dk what u wanna be called

hexed hatch
#

Call him sir

quaint mantle
#

sir

#

thank u sir

left swift
#

how can i set entityPlayer ping? (NMS)

hexed hatch
#

Why do you want spoof a player’s ping?

ivory sleet
#

sus

young knoll
#

We live in a susiety

left swift
hexed hatch
#

Ah, that makes sense

quaint mantle
#

why do you want to compile the jar too

#

Huh

#

you want a 36mb plugin?

reef wind
#

is spigot not in the jar?

#

you don't want that

reef wind
#

why would you?

#

spigot doesn't need to be shaded

#

any errors?

#

shading bukkit/spigot will make your plugin gigantic