#help-development

1 messages · Page 1556 of 1

opal juniper
#

What can’t you send

umbral pagoda
#

file with error

quiet ice
#

then use another paste service

opal juniper
#

Send the paste

umbral pagoda
opal juniper
#

Don’t send us the file

#

Go to the link

calm whale
#

🤦

opal juniper
#

?paste

undone axleBOT
hybrid spoke
#

?paste

undone axleBOT
hybrid spoke
#

:(

opal juniper
#

Paste it in

#

And then control s

calm whale
#

copy/paste your code in, save it and drop the link

opal juniper
#

Copy link

hybrid spoke
#

click on the very sus link, drop it in, throw it in this chat.

wild marten
#

do you have a link to the tutorial?

quiet ice
weary geyser
weary geyser
wild marten
#

cheers

opal juniper
umbral pagoda
calm whale
#

your are trying to cast a fish into a player ? oO

quiet ice
#

org.bukkit.craftbukkit.v1_8_R3.entity.CraftFish cannot be cast to org.bukkit.entity.Player
:why:

young knoll
#

isEmpty, but yes that should work

quiet ice
#

basically, use instanceof to check whether a cast is "safe"

umbral pagoda
#

plugin

#

so idon't know

#

how

#

to fix it

hybrid spoke
#

lol

#

casting fish to player

quiet ice
#

well, then noone can help you

hybrid spoke
#

what a fishhead

#

:D:D

#

badumm tsch

young knoll
#

I think it will include smelting recipes

umbral pagoda
hybrid spoke
#

can you send us line 98 of your code @umbral pagoda

umbral pagoda
hybrid spoke
#

me.SSP.Listeners.Pvp.onDamage(Pvp.java:98) to be exactly

quiet ice
#

but, in 80% of cases prepending

if (!(ent instanceof Player)) {
  continue; // or break; - depending on what you want
}

or

if (!(ent instanceof Player)) {
  return;
}

would work

#

if that is not possible, you need to recode your entire method

hybrid spoke
young knoll
#

I’m guessing EntityDamageByEntItyEvent

quiet ice
#

In this case, a fish is a damager

hybrid spoke
quiet ice
umbral pagoda
quiet ice
#

But it could also be that a zombie is a damager, etc. so use instanceof to be 100% sure

young knoll
#

No fish in 1.8

hybrid spoke
quiet ice
#

Use


        Entity p = e.getEntity();
        Entity k = e.getDamager();

instead

#

don't do the casts before you are doing an instanceof

#

Protip: Java16 supports

if (e.getEntity() instanceof Player p) {}
opal juniper
#

Runnable everywhere

#

Smh

quiet ice
young knoll
#

Should

umbral pagoda
#

@quiet ice now all code give me error

hybrid spoke
#

new ArrayList<>(Arrays.asList(Material.values()))

young knoll
#

Alternatively you can just make a set of unobtainable items to remove

hybrid spoke
#

why are you creating 2 instances of a list?

quiet ice
#

.values() returns an array

hybrid spoke
#

Random random = new Random(); not needed, use ThreadLocalRandom

young knoll
#

Yes but Arrays.asList returns a list

quiet ice
young knoll
#

Which they are then passing into a list

ivory sleet
young knoll
#

Also checking recipes isn’t great for finding unobtainable items

#

No recipes for rotten flesh, but it’s obtainable

hybrid spoke
quiet ice
ivory sleet
quiet ice
#

nvm, forgot that .values() returns a clone

young knoll
#

It’s an enum

quiet ice
#

yes, the new ArrayList<>() call is superflous

young knoll
#

You can’t modify the values anyway

ivory sleet
#

Lists.newArrayList(Material.values()) might be more appropriate

quiet ice
young knoll
#

Well yes

#

But that’s not the point

ivory sleet
#

That sounds counter intuitive

quiet ice
#

but the values() method returns a clone - as I said

#

so, doesn't matter

hybrid spoke
#

go away

quiet ice
#

I do this all the time

#

well, though I do it without reflections but with ASM - but at the heart it is the same

hybrid spoke
#

and reflections are a bad usage

ivory sleet
#

Well I mean if we have fully mutable list implementations, I see no reason why you would use reflection on a fixed size list implementation.

limpid bronze
#

Hey, I did a /invsee command for my plugin but I noticed that it was a bit difficult to differentiate the hotbar and the inventory. And on top of that, you couldn't access the armor. So I'd like to make a custom GUI that separates the hotbar from the inventory and armor. Of course this GUI has to be linked with the complete inventory of the player in question. Do you have an idea how to see the armor and make a GUI that is linked to the player's inventory? (PING ME)

quiet ice
#

I'm talking about modifying the synthetic $values array in an enum btw since perhaps some might have misunderstood me

next crown
#

is there any plugin to protect assigned region for 1.17

#

that cant be destroyed by tnt or other destructive stuff

quaint mantle
next crown
#

ok sry

quiet ice
#

The synthetic field isn't in a core java class

young knoll
#

It’s okay

#

We have the power of unsafe

waxen plaza
#

is there a method that gets the uuid of a player by name ?

#

oh ok but what about just looping trough all offline players?

#

I am not

#

right

#

ok

quiet ice
#

isn't there a method that doesn't do IO requests?

waxen plaza
#

Bukkit.getPlayer(String name) what about this

young knoll
#

Only for online players

waxen plaza
#

Ye, I need it only for online

quasi hornet
#

its stuck with this? does someone know how to fix?

mystic tundra
#

Im trying to get an image file from my plugin folder, a bufferedimage, but it keeps giving me an error that the “supposed to be” image is empty

#

Or rather, null

#

One sec

#

this is the whole thing, though only the last part is the important one

waxen plaza
#

what is me.Simo.TrollMaster.Commands.Baldify.Bald line 88

quiet ice
#

that is a lot of inner classes you have there

mystic tundra
#

One sec

#

Oh yeah that’s the part where it does somethint with the image

#

It overlays it on top of another one

quiet ice
#

also, please use proper package naming convetions me.Simo.TrollMaster.Commands.Baldify.Bald could be
me/Simo/TrollMaster/Commands/Baldify.Bald or
me/Simo/TrollMaster/Commands$Baldify.Bald or
me/Simo/TrollMaster$Commands$Baldify.Bald or
me/Simo$TrollMaster$Commands$Baldify.Bald

mystic tundra
#

Wheres that

#

Isnt it supposed to be me.Simo?

#

With .

weary geyser
#

Package names should be lowercase

loud haven
#

how can i remove my plugin form spigot web ?

quiet ice
young knoll
#

Report it and ask for removal

mystic tundra
#

But about the image

#

Why is it always null?

quiet ice
#

because java non-bytecode name has the same seperator between inner classes and packages

mystic tundra
#

Ah

#

So I should use a different one?

#

If I understand correclty

quiet ice
#

I recommend you to set your fields before using them - I assume that this is your core issue

young knoll
#

Seems resonable

quiet ice
#

it could also not be static

#

we have no idea about the nature of the field

#

nvm, it 100% is not a static field

#

because otherwise java would say "main" is null and not "this.main" is null

mystic tundra
#

Ok

quiet ice
#

As long as it isn't as concern as my method of doing it, I see no issue

#

That requires that either they use IntelliJ or bothered to actually configure eclipse correctly

#

until you use the eclipse compiler

young knoll
#

Eh who is around

#

@austere cove ?

weary geyser
#

Lmfao

#

Bruh

austere cove
#

?

weary geyser
#

This is so much a scam

#

@austere cove

young knoll
#

Pretty common one too

weary geyser
#

Yup

#

I see it all the time

tardy delta
#

can i cast this class to Inventory?

#

btw it has subclasses

#

ah

granite stirrup
#

The image says it implements InventoryHolder

#

Lol

#

Apple and Pear is castable to Fruit aslong as apple and pear are fruits

tardy delta
#

yea i understand

granite stirrup
#

Is pear a fruit nny

#

I don't know if a pear is a fruit or a vegetable

lament minnow
#

Is it possible to escape the <command> and <permission> macros?

#

fruit

granite stirrup
#

I know that apple is a fruit

lament minnow
#

pear is a fruit

tardy delta
#

bu the only problem is that i have a custom gui and i want to set an item inside it after i created it

granite stirrup
#

Oh k

tardy delta
#

because only inventory has the setItem method

lament minnow
#

do you talk to me or the pear guy

#

oh him

tardy delta
#

and not inventoryholder

#

yes it just returns the inventory

#

ah wait

#

aha found it

granite stirrup
#

Wdym you just did return null xd

lament minnow
#

when the method

is void

tardy delta
#

oh that class does not do anything

#

its just kind a blueprint

granite stirrup
lament minnow
#

They are replaced with the name of the command and the permission required to use it, respectively.

tardy delta
quiet ice
#

So why would you want to escape such "macros"?

#

(these aren't macros btw)

lament minnow
#

well that is not my mistake

#

anyway

tardy delta
#

basically yes i'll make it an inv

lament minnow
#

usage: "Usage: /<command> <command> <argument>"

tardy delta
#

interface*

lament minnow
#

i am doing that because i am following what minecraft does for their arguments

#

as in

#

() is for arguments

#

[] is for optional things

quiet ice
#

There are two ways of potentially dealing with this: unicode or html escape

lament minnow
#

and <> is for things with no limit of choices, like usernames

lament minnow
#

if the latter, it would probably convert unicode to characters, right

quiet ice
#

the issue with html escapes is that it is unlikely that spigot would even try to parse them

lament minnow
#

oh

#

yike

#

well i am too stubborn to not abide by minecraft's system for this so i am going to figure out some yaml bullshit to do this

granite stirrup
lament minnow
#

never heard of that but i can look it up

quiet ice
#

IT IS NOT A YAML ISSUE

#

IT IS A SPIGOT ISSUE

granite stirrup
#

?

lament minnow
quiet ice
#

... or OP is a dumbfuk and there is no issue

lament minnow
#

?

granite stirrup
#

What's he trying to do

quiet ice
#

Either way, snakeyaml is not the one that processes the placeholders

lament minnow
#

trying to include a literal string of <command> in a usage string

#

@granite stirrup

#

i have not tested it yet but i would think that spigot will replace both instances with <command>

quiet ice
#

try &lt;command> or \u003Ccommand>

lament minnow
#

okay, i shall

#

i will return with whether it worked

quiet ice
#

but it is better to see whether it even treats this like a placeholder

granite stirrup
#

If you have a var that is a instance of A and it extends B if you pass it in a method that wants a B will it cast the A into B ?

tardy delta
#

does for example invA.setItem(invB.getItem()) also copies the itemmeta? (both are inventories)

wicked remnant
#

it should yeah

quiet ice
#

does it even copy anything

quaint mantle
#

why am i not able to use commands as the console onm spigot server

quiet ice
#

if it copies the itemstack instance, yes, otherwise no

tardy delta
#

ok

ivory sleet
#

Isn’t Cloneable#clone like not too expensive tho? Apart from the mandatory try catch

#

Well you do call super.clone()

quiet ice
#

ItemMeta#clone can be very, very expensive though

granite stirrup
#

Lol

quiet ice
#

which makes it funny that ItemStack#equals() does it not only once, but multiple times

granite stirrup
#

?

quiet ice
#

to get the damage of the item the itemmeta is cloned

#

to compare the item meta the item meta is also cloned

#

let me see if paper bothered to change that

granite stirrup
#

What

tardy delta
#

lol

granite stirrup
#

I don't read the MC code lmao

quiet ice
#

they did not

lament minnow
#

intellij gang

#

sad

granite stirrup
quiet ice
#

it's the getItemMeta() call that clones it

granite stirrup
#

It doesn't look good on my phone

#

So all the text is like blury as shit

quiet ice
#
Material comparisonType = (this.type.isLegacy()) ? Bukkit.getUnsafe().fromLegacy(this.getData(), true) : this.type; // This may be called from legacy item stacks, try to get the right material
        return comparisonType == stack.getType() && getDurability() == stack.getDurability() && hasItemMeta() == stack.hasItemMeta() && (hasItemMeta() ? Bukkit.getItemFactory().equals(getItemMeta(), stack.getItemMeta()) : true);
proud basin
#

yikes

quiet ice
#

it would be funny if hasItemMeta also cloned the item meta

hybrid spoke
#

luckily not

lament minnow
#

i have been very disconnected from this conversation; are we discussing bad performance in spigot code

hybrid spoke
#

most likely

quiet ice
#

The issue is as old as bukkit is - nothing spigot specific

granite stirrup
#

I wonder if paper fixed it

quiet ice
#

as I said, it did not

lament minnow
#

that is why i am half on-board with paper's plan to completely remake their api

quiet ice
#

The above snippet was from my paper fork

granite stirrup
#

Oh f

quiet ice
#

And remember, this is a 2 - 3 line fix

lament minnow
#

because being a fork of a fork of old software has a lot of restrictions

granite stirrup
#

Why don't u fix it

lament minnow
#

i have not coded for paper, but i would think that they have to use io.papermc, org.bukkit, and org.spigot, and that is probably really messy to navigate

quiet ice
sullen marlin
#

?ban @wraith rapids

undone axleBOT
#

Done. That felt good.

lament minnow
#

yike

#

what did i just witness

hybrid spoke
#

F

lament minnow
#

i sort of wanted to ask about what the pr would need to change because i want to fix stuff

#

though, thinking again, i do not have too much experience with coding for spigot

#

and none for editing spigot itself

quiet ice
#

just replace all getItemMeta() calls with meta

stone sinew
lament minnow
#

oh is this a regular occurrence

sullen marlin
#

the same things he always does

summer scroll
#

wtf just happened

lament minnow
#

someone got banned for saying something like "i am waiting for someone in this community to do the 3 PRs required to fix it" but more crudely

hybrid spoke
lament minnow
#

i do not actually know what "it" was because i am disconnected from the conversation, but i would like to know

sullen marlin
#

none of your business

#

they've been repeatedly warned about their attitude and haven't changed it

lament minnow
#

oh okay

#

something about the earlier "what did they do this time" made me think it was being silly or something

#

so yike

#

and, by "it", i mean the issues with the code

hybrid spoke
# lament minnow this "it"

i just jumped in seconds before you, but it was probably a discussion about the frequently cloning of the itemmeta

quiet ice
#

I think the spigot plugin compat mockery might be the issue there - but I think that I am interpreting too much into this

#

The inefficiencies of spigot code is unlikely the issue here - rather something surrounding it

opal juniper
#

i think sometimes there is no real "ideal" way to do things

#

just the least bad

#

but they are the issues that get picked up on

granite stirrup
#

Bruh I missed MD_5 banning someone

#

:(

tardy delta
#

does instanceof also checks if a class implements an interface

#

?

#

never used something like this before

granite stirrup
#

Ye

#

I think so

#

Not sure tho

#

Pretty sure it does

tardy delta
#

ah yes

granite stirrup
#

Stupid auto correct

tardy delta
#

xd

dire marsh
granite stirrup
tardy delta
#

wdym

#

why is he banned

quiet ice
#

We already talked about it

#

for once I am an idiot and have no idea where it is in the first place and secondly I do not feel like actually signing such a contract that is basically "here, give me my personal info"

granite stirrup
#

Nny is true 7 year old

tardy delta
#

google translate goes brr today

#

but i wanted to ask if there's an overcoupling (idk if thats a word) class for all the eventhandler classes (like invClickEvent etc)

granite stirrup
#

He said he was just older than 1.8 and t
That came out 7 years ago

granite stirrup
#

Oops

#

I accidently turned caps lock on my phone 🤣

tardy delta
#

grr stupid case label

granite stirrup
#

Then why are you using switch cases

#

;-;

tardy delta
#

to change the block of my tradegui

#

if someone clicks a specific slot the item changes

granite stirrup
#

Use ifs?

tardy delta
#

mmmh

granite stirrup
#

😂

tardy delta
#

just putting @EventHandler before it tututut

#

hopefully that gives no errors 🥺

hybrid spoke
tardy delta
#

yea i accidently removed it or something 🙄

hybrid spoke
#

is this your eventmethod?

tardy delta
#

lol and now its gone

#

no

#

some stupid method to prevent me typing 5 times the same thing

granite stirrup
#

Switch cases are really hard to manage lol

#

They like the same Fing performance as ifs

tardy delta
#

oh

granite stirrup
#

Unless your running a million ifs a second you might have a difference

tardy delta
#

there's my code spaghetti again

granite stirrup
#

No bigge

hybrid spoke
tardy delta
#

mmmm eventhandler starts at line 120 and stops at 190

#

😂

granite stirrup
granite stirrup
#

YandereSimulator does a million ifs every second and it doesn't crash xd

tardy delta
#

nasa pc

granite stirrup
#

No I have the worst pc

#

Lol

tardy delta
#

I would be very disappointed if this code of 300 lines wouldn't work 😂😂

granite stirrup
#

Lol I written like 200 lines like yesterday and if it doesn't fucking work I'm killing myself

#

Jk

waxen plaza
#

What happens if multiple plugins have a same command? (for example /invsee)

lament minnow
#

It would probably be possible to execute the commands independently as long as a namespace is provided for them.

#

But it is a bad idea to make commands with names or aliases identical to commands from popular plugins, like EssentialsX.

summer scroll
#

Usually your command will override EssentialsX command.

tardy delta
lament minnow
#

bruh

waxen plaza
tardy delta
#

hahha p.openInventory(otherplayer.getInv()) 😂

#

👌

waxen plaza
#

does the other player see it real time when I change it or do I have to do anything

summer scroll
#

Real time, yes.

waxen plaza
#

cool

tardy delta
#

i did it with 15 lines code 👌

quiet hearth
#

If i have a file of all the enchants in minecraft and i want to have it pick a random one how would one do that.

tardy delta
#

Random

waxen plaza
#

random number generator

quiet hearth
#

And use the indexes?

tardy delta
#

ofc

#

pick a line number of something idk

waxen plaza
#

get the lenght of the list of enchants and set it to give a rand number from 0 to lenght

tardy delta
#

lol

granite stirrup
lament minnow
#

oh is that so

#

do only the main names have to be identical, then

waxen plaza
#

Does that mean to command overrides the alias?

granite stirrup
#

I'm pretty sure commands can override commands but alieses dont

restive yew
#

hello i am pretty new to minecraft modding and was trying to make a custom armor set and i coundnt get it to render ( i got a black a purple texture) and i am not sure why

granite stirrup
#

The commands will win over alieses

granite stirrup
#

Not mod development

restive yew
#

sorry, i think it was a plugin

tardy delta
#

does inv.setExtraContents(item) with item an itemstack of existing items, copies the items meta?

granite stirrup
restive yew
#

oh, well im not too smart am i

granite stirrup
#

Well your trying to make a mod so ask another server

restive yew
#

ok

granite stirrup
#

Since this is for plugin dev

tardy delta
#

maybe look this

granite stirrup
#

It's not a fucking plugin

#

That's a fucking resource pack

tardy delta
#

idk 🙇‍♂️

#

all custom items plugins need a resourcepack

#

you cant make custom items yourself so

granite stirrup
#

Yeah but you can use mods lmao

granite stirrup
quiet hearth
#

How would you pull the name of the index from a XML Doc file to a variable called enchantment

granite stirrup
#

You would need something to parse XML documents

#

Idk if spigot has one already

#

So you might need to find a library

quiet hearth
#

Ok does it matter what type of file it is if i have a list of all minecraft enchants

granite stirrup
#

Spigot has things so you can read yaml

#

.yml/.yaml

quiet hearth
#

Ye ok

granite stirrup
#

It's called YamlConfiguration

#

?jd

quaint mantle
#

Is there a way to like bring back 1.8 pvp
to disable the cooldown on attacking

granite stirrup
#

OCM?

quaint mantle
#

wat wat now

granite stirrup
#

OldCombatMachanics

quaint mantle
#

no but like

#

to code

granite stirrup
#

Packets

#

Just look at OldCombatMachanics source

quaint mantle
#

where can i find that

granite stirrup
#

You might have to decompile it

quaint mantle
#

foud the source

granite stirrup
#

Ok

steady plinth
#

Can anyone help? didn't modify quickshop jar but why showing this error
"quickshop is disabled, please fix any error and restart
-[Error /Signature verify] Security risk detected, Quickshop jar has been modified"

quaint mantle
#

looks like alot of work

granite stirrup
steady plinth
granite stirrup
#

Where did you get your spigot jar?

steady plinth
#

from spigot website

#

is there any solution?

eternal oxide
steady plinth
#

i said from the website

granite stirrup
eternal oxide
#

You were asked where you got your spigot jar

#

not the plugin

granite stirrup
#

wait is 1.17.1 out?

#

for spigot?

#

viaversion got updated to 1.17.1 lol

gleaming grove
#

Can someone explain to me what is wrong in my code? My goal is to display stone at the first slot of Anvil. Spigot version is 1.17

stone sinew
gleaming grove
#

something changed?

granite stirrup
#

¯_(ツ)_/¯

worn sierra
#

can I create an IDEA project with sources of spigot that buildtools built

#

to create my custom server jar

#

a fork

granite stirrup
#

even if you did you wouldnt be able to publish it

worn sierra
#

so how can I create my own fork?

lusty cipher
#

@gleaming grove If I remember correctly Anvil inventories in Spigot are a pain. I personally use AnvilGUI cause it just makes it a heck of a lot easier.

granite stirrup
#

moshi did you just say

#

something

#

that i think you just said

steady plinth
#

yeah

granite stirrup
#

omfg

gleaming grove
granite stirrup
worn sierra
granite stirrup
#

you get it from bt

lusty cipher
#

@gleaming grove I made AnvilGUI for 1.17 and also use it, so it definitely exists.

granite stirrup
#

?bt

undone axleBOT
granite stirrup
#

stop saying getB*kkit

eternal oxide
#

its a banned word in here because its BAD

gleaming grove
#

any ideas?

granite stirrup
lusty cipher
#

Yeah that was the issue why AnvilGUI exists I think. You need some extra packets and some NMS stuff.

worn sierra
#

how can I create my own fork of spigot?

granite stirrup
steady plinth
#

okey....but i think you got the answer where i got the jar file. Can you help me?

eternal oxide
#

?contribute

worn sierra
#

I want to be able to edit nms as well

lusty cipher
worn sierra
gleaming grove
granite stirrup
worn sierra
#

LMAO

granite stirrup
#

because idk how to either

gleaming grove
lusty cipher
#

1_17_R1 is 1.17.x?

granite stirrup
#

i think

waxen plaza
#

What's the max inventory size?

lusty cipher
#

yes it is

gleaming grove
gleaming grove
waxen plaza
granite stirrup
#

1_17_R1 is 1.17

gleaming grove
#

you can use InventoryType.CHEST.getDefaultSize()

quaint mantle
#

This gets triggered on player respawn (delete chest + items) do i need to load chunk for safety or can it just handle location fine ?

waxen plaza
#

I just wanted to know what's the max

granite stirrup
worn sierra
quaint mantle
worn sierra
granite stirrup
#

maybe when you remove a block from a world it might load it for you if its unloaded but probs not

worn sierra
worn sierra
#

which makes 63 slots

quaint mantle
worn sierra
#

but it looks buggy on client side

granite stirrup
#

1.17-rc2 added nothing XD

waxen plaza
#

I'll test and see

worn sierra
#

I mean you can create 7 lined inventory but it doesnt look good

worn sierra
summer scroll
#

really? 63 slots

#

is that really possible?

granite stirrup
#

the minecraft launcher is defiantly electron LOL

tawdry scroll
worn sierra
granite stirrup
worn sierra
#

let me try tho

granite stirrup
#

wtf is that screenshot

sharp bough
#

so now if i do
new checkKitCooldown(...)
all of the values like kitsUsed, playerID, cooldown, kitID will reset to null, right? because i create a new instance of the class

waxen plaza
granite stirrup
#

lol it says fixed bug U+1FEC is wrong in Minecraft's font

#

in 1.17.1

sharp bough
#

but if a mke a value static, and then request it like
new checkKitcooldown(...)
and set
static UUID id
and then request it in another class i can save the value between classes right?

steady plinth
eternal oxide
undone axleBOT
waxen plaza
#

looks like max is 54

formal sphinx
#

this question is completely irrelevant to plugin development
While working with Java Servlets how do i enable these tabs on my Eclipse bar?(Markers, Properties, Servers etc)

#

view of what my Eclipse tab looks like

granite stirrup
#

it probs will look bugged to

waxen plaza
#

I don't need to make it bigger

granite stirrup
#

i think its in there

formal sphinx
granite stirrup
#

click other?

formal sphinx
#

I went one by one through each folder, and found nothing

granite stirrup
#

maybe its a custom thing?

#

or a plugin?

waxen plaza
#

lol, I can't join my server anymore

formal sphinx
gleaming grove
waxen plaza
#

How do I reset my inventory? lol

gleaming grove
#

delete your player info

waxen plaza
#

right

worn sierra
#

here's a 7 lined inventory

worn sierra
waxen plaza
worn sierra
#

here's a 10 lined inventory lol

worn sierra
waxen plaza
worn sierra
#

I guess you may use this with custom texture packs

waxen plaza
#

Sure but it would take to long to create custom textures...

worn sierra
#

why did you ask max size of inventories? just curious

waxen plaza
#

I am making some kind of vault plugin and I can create different inventories with different sizes depending on player rank

sharp bough
#

thats illegal

formal sphinx
smoky oak
#

This the right place to ask about eclipse issues connected to the bukkit api?

granite stirrup
quiet ice
sharp bough
#

you cant use more than 54 slots for the inv

granite stirrup
#

bukkit doesnt let you but you can do it yourself

quaint mantle
#

Is there any way to block unlisted list of commands in /[tab] without ProtocolLib

sharp bough
#

but.. its illegal. you cant. the system doesnt want you to. you are against the system. THATS ILLEGAL

sharp bough
#

so you are telling me... this entire time

#

i could?

#

my entire life.. its a lie

granite stirrup
#

yes of course you can have more than 54 slots

sharp bough
#

my github. my portfolio its all a joke

#

theres no such thing as limit

#

it was all in my head

granite stirrup
#

what

scenic hornet
#

so i was to add item to someones inventory when they join, is their a plugin for that? since i looked on the spigot website but can't find anything

scenic hornet
sharp bough
#

why do you send him to help serve rlmao

stiff topaz
#

This is for development

#

Not for looking for plugins

sharp bough
#

ig

smoky oak
#

So this is the issue. Most of the classes in eclipse have an auto-complete where you write <instancized object>. and get a list of possible methods, but some classes do NOT show up their methods.
This is the case for, including but not limited to:
-ItemMeta
-ItemStack
-Inventory
-PotionData
How do i get those classes to show me their methods?

#

Aside from looking it up in the class itself of course

quaint mantle
#

Eclipse is so old

tawdry scroll
eternal oxide
#

Stay with Eclipse

quaint mantle
formal sphinx
smoky oak
#

neither of those answer my question. Why those classes, but not others?

#

I.E. the block class works just fine

#

Why?

granite stirrup
formal sphinx
#

have you tried pressing ctrl + space @smoky oak

granite stirrup
#

i switched to intellij cuz eclipse was too buggy

smoky oak
#

'No default proposals'

#

um

#

doesnt it grab the code

#

from the api

#

how can it NOT show up

granite stirrup
#

are you using maven?

smoky oak
#

yes?

#

but how is that important?

granite stirrup
#

make sure ur importing the libs correctly

smoky oak
#

what exactly do you mean?

#

and the api in my dependencies

formal sphinx
waxen plaza
#

Does whatever I type in the config.yml save as default when I compile?

smoky oak
#

i am importing the correct files

#

and yes

maiden briar
#

If I put this in the process builder C:\WINDOWS\system32\cmd.exe, /D, /C, C:\Users\<>\IdeaProjects\TvheeAPIRepositoryInstaller\test\apache-maven-3.6.0/bin/mvn.cmd, -Dbt.name=dev, install:install-file, -Dfile="C:\Users\<>\IdeaProjects\TvheeAPIRepositoryInstaller\test\TvheeAPI-1.6.0-01.jar", -DgroupId=me.tvhee, -DartifactId=TvheeAPI, -Dversion=1.6.0-01, -Dpackaging=jar

I get 'C:\Users\<part of name>' is not recognized as an internal or external command, operable program or batch file.

But if running in the cmd.exe I don't discover any problems

smoky oak
#

use "

#

around any path that contains a space

maiden briar
#

Where do I need to use it?

smoky oak
#

probably around your C:\Users\<>\...mvn.cmd

#

also

#

it could be a good idea

maiden briar
#

Ok

smoky oak
#

to replace your /

#

with

#

\

#

same path too

maiden briar
#

The first is a directory, a Java File where you can't do that

lusty cipher
#

how can I know that my user clicked on the first item in the inventory?

smoky oak
#

MouseKlickEvent

#

then check the location

lusty cipher
#

correction: inside of InventoryClickEvent

smoky oak
#

i think slots are indexed 1 through 36

#

*37

#

it should be either 0 or 1

maiden briar
#
'C:\Users\<part of name>' is not recognized as an internal or external command,
operable program or batch file.
Exception in thread "main" java.lang.RuntimeException: Error running command, return status !=0: [C:\WINDOWS\system32\cmd.exe, /D, /C, "C:\Users\<>\IdeaProjects\TvheeAPIRepositoryInstaller\test\apache-maven-3.6.0/bin/mvn.cmd", -Dbt.name=dev, install:install-file, -Dfile="C:\Users\<>\IdeaProjects\TvheeAPIRepositoryInstaller\test\TvheeAPI-1.6.0-01.jar", -DgroupId=me.tvhee, -DartifactId=TvheeAPI, -Dversion=1.6.0-01, -Dpackaging=jar]
    at me.tvhee.tvheeapi.repositoryinstaller.Builder.runProcess0(Builder.java:272)
    at me.tvhee.tvheeapi.repositoryinstaller.Builder.runProcess(Builder.java:196)
    at me.tvhee.tvheeapi.repositoryinstaller.Builder.runMaven(Builder.java:172)
    at me.tvhee.tvheeapi.repositoryinstaller.Builder.start(Builder.java:133)
    at me.tvhee.tvheeapi.repositoryinstaller.Bootstrap.main(Bootstrap.java:31)
lusty cipher
#

I know that

#

but I don't know of any function to know which index it was

#

oh

#

event.getSlot()

#

nvm then

smoky oak
#

@maiden briar it's very likely your issue stems from you using backslash and forward slash in your path

#

replace the one type with the other and try again

maiden briar
#

The problem is that it is stored in Java's File

#

You can't put a string instead of a File

smoky oak
#

the other path

#

"C:\Users<>\IdeaProjects\TvheeAPIRepositoryInstaller\test\apache-maven-3.6.0/bin/mvn.cmd"

#

were talking about that one right?

maiden briar
#

Yes

smoky oak
#

just try replacing the forward slashes

#

if it still doesnt work

maiden briar
#

args.add("\"" + Builder.maven.getAbsolutePath() + "\\bin\\mvn.cmd\""); I can try this

smoky oak
#

yeah

maiden briar
#

Still same error

#

But now the / are correct

smoky oak
#

can you try File.separator ?

#

ah

#

nvmind then

#

is there a 'caused by' further down?

maiden briar
#

No

granite stirrup
#

why dont you just put a copy of maven with your project?

#

and run that

maiden briar
#

That does not work

#

I am trying to do something similar than BuildTools, that works good

granite stirrup
#

i mean bt downloads maven and uses it

maiden briar
#

?paste

undone axleBOT
maiden briar
#

Does not work

granite stirrup
#

it doesnt use the maven you have installed

maiden briar
#

Yes, but I want to install it in the local repo so other people can build upon it

#

The problem is in #runMaven, because in #runProcess it just works

tardy delta
#

are these inventory slots from the player also nummered?

#

or is it just Inventorytype.PLAYER?

quiet ice
#

yes, all those slots should have an appropriate index

tardy delta
#

the last index of the highest part is 53 so would it start from 54?

maiden briar
#

No you have another InventoryView

waxen plaza
#

player has it's own inventory

tardy delta
#

ah

summer scroll
#

Get the raw slot instead perhaps?

tardy delta
#

i dont know

summer scroll
#

Maybe you can get the inventory slot by using the raw slot, even the player's inventory.

#

I never used it tho.

granite stirrup
#

im pretty sure

quiet ice
#

but you shouldn't rely on this fact - better use the inventory view

granite stirrup
#

you have to use getSlot()

quiet ice
#

There is the raw slot and the regular slot

summer scroll
#

Usually I get the bottom inventory instead.

tardy delta
granite stirrup
#

big difference

quiet ice
#

they are the same for the top inventory, but very different in the bottom inventory

#

(impl specific btw, it may change in the future)

waxen plaza
#

Does whatever I type in the config.yml save as default when I compile?

quiet ice
#

The raw slot is used in packets iirc, and is translated by bukkit into the correct slot and inventory

tardy delta
#

ah get raw slot would start from 54 in the lowest inv

quiet ice
#

Depends on the size of the top inventory, but in your case, yes

#

But best use the inventory view to convert between these representation types, otherwise you might do mistakes in your logic a bit easier

tardy delta
#

found it

#

thanks

#

but i'm really struggling with scoreboards xd

quiet ice
#

yeah, they are pretty mean from time to time

tardy delta
#

its stupid that you have to create different scores for everything

lusty cipher
#

guys, im using gradle and I just found out that eventhough I use the following snippet, my dependencies still get compiled to class files version 60.

tasks.compileJava {
  java.sourceCompatibility = JavaVersion.VERSION_1_8
  java.targetCompatibility = JavaVersion.VERSION_1_8
}
tardy delta
#

🤔

granite stirrup
#

why is performance worse on paper 1.17

opal juniper
#

On what?

granite stirrup
#

its slower on paper 1.17

safe pond
#

could be a lot of factors. Porting to Java 16 is probably one of em

quiet ice
#
 for (Entity e1 : e.getNearbyEntities(level, level, level)) {
                if (e1.getLocation().getWorld().equals(e.getLocation().getWorld())) {

The second line is useless, right? (currently cleaning up someone else's code)

wild inlet
#

These new mojang mappings

#

Any reason why they're pretty shit?

opal juniper
#

As in what is it slower for

wild inlet
#

If these are great mappings consistently given by mojang themself

#

I don't expect to be using chunkMap.G

quiet ice
#

That is because spigot reobfuscates them

dusty herald
wild inlet
quiet ice
#

Why? Don't ask, but they do. Plugin authors can use them however without too much issues

wild inlet
#

This seems very incorrect.

#

Most of the mappings are fine

#

But there's random G's here and everything

#

a's, b's.

#

Loads of var1, var2 but that's expected

#

I just want some consistency

quiet ice
#

Then classes are mojmap and the rest is spigot mappings

wild inlet
#

And so far all this has brought is the same shit slightly better

#

and whole lot of work to convert

wild inlet
#

You seem to be guessing

#

I'm using -remapped

quiet ice
#

Then why the hell would it be so incomplete?

#

It has to be spigot mappings as this is the only mappings that is incomplete

wild inlet
#

Okay yeah you're just guessing.

#

Point is the mojang maps either aren't that great

quiet ice
#

Afaik paper uses full mojmap though (in dev though)

wild inlet
#

(Which I think is the case)

#

As I've used mojmap before this update

quiet ice
#

mojmap has 100% coverage on class & method & field names

wild inlet
#

Really?

#

That wasn't my experience when I last used it.

#

And this was myself

quiet ice
#

Yes

wild inlet
#

On a natural minecraft jar.

#

It makes sense the mappings are harder to apply on a modified source though

quiet ice
#

The natural minecraft jar has full obfuscation

wild inlet
#

But as I said

#

Using mojmap before

#

It wasn't complete

#

Not even close.

#

With no spigot or paper

quiet ice
#

What did you use to apply the mappings?

wild inlet
#

Can't remember, some open source tool I think.

#

Maybe fabric's tool

#

Was a while ago

#

Back with 1.16

quiet ice
#

enigma?

#

I know that paperweight uses quilt's tiny-remapper and I have yet so see any issues (outside of the LVT being not remapped), though I know that it isn't without some.
This would mean that mojmap at it's core is not an issue, but whatever that applies those mappings is not great

marble granite
#

can anyone point me to some load balancing help resources? i am having a hrad time understanding it

opal juniper
#

Anyone know what ChunkStatus.FULL would be on 1.17

wild inlet
opal juniper
#

no.... i dont think so

wild inlet
#

Or is this API?

opal juniper
#

nms

wild inlet
#

There's like 3 different versions of source

#

you're probably on full obfuscated atm

opal juniper
#

mhm

#

yep

wild inlet
#

Cross reference it with the -remapped jars

opal juniper
#

i think so

wild inlet
#

And you'll have an easier time with this

opal juniper
#

ok

wild inlet
#

and with future nms conversions 🙂

opal juniper
#

may help

wild inlet
#

My life atm

opal juniper
#

once i make a remapped jar do i have to decompile it or something

wild inlet
#

I'm changing to mojmap right now

#

Yeah

#

You do

#

I'd use CFR

opal juniper
quiet ice
#

Quiltflower is good at decompiling minecraft from what I heard

#

Basically a beefed up version of Forgeflower which is a beefed up version of fernflower/intelliJ decompiler

waxen plaza
#

How do I set the config.yml file back to default?

opal juniper
#

overwrite it

quiet ice
#

saveResource(true, "config.yml") or something like that

waxen plaza
#

PrivateVaults.getInstance().saveDefaultConfig();Like this?

quiet ice
#

Read the docs of that method but if anything, new File("pluginName/config.yml").delete(); should do the trick

haughty musk
#

Our plugin wont start unless we do /reload after we restart the server. We know /reload is bad so we want to know if there is a fix..

@Override
public void onEnable() {    
        
    this.getServer().getPluginManager().registerEvents(this, this);
        
    CTeam redTeam = TeamManager.getInstance().registerNewTeam("redTeam", "[RED] ", ChatColor.RED);
    CTeam blueTeam = TeamManager.getInstance().registerNewTeam("blueTeam", "[BLUE] ", ChatColor.BLUE);
    
    redTeam.getBukkitTeam().setAllowFriendlyFire(false);
    blueTeam.getBukkitTeam().setAllowFriendlyFire(false);
    

    lobbybar = new GameBar(this);
    lobbybar.createBar();
            
                
    if (Bukkit.getOnlinePlayers().size() > 0) {
        for(Player on : Bukkit.getOnlinePlayers()) {
            lobbybar.addPlayer(on);
                System.out.println("The plugin is launching");

        }
    }            
                

}
                ```

This is our onEnable if that could help
quiet ice
haughty musk
#

No errors

lament bronze
#

onEnable is executed when the plugin is enabled (on server start or reload)

haughty musk
#

It just doesnt do anything with the plugin until we type /reload

lament bronze
#

Well yeah

#

It makes sense

#

You probably want a command or something

wild inlet
#

Does it even make sense to develop with mojmap when we can't even talk about how to use mojmap?

eternal night
#

What

#

You definitely can

haughty musk
eternal night
#

The usecase specifically states it is for development purposes

#

Obviously not a lawyer tho

quiet ice
#

Spigot is thankfully very open on mojmap, other than Quilt and Fabric

haughty musk
quiet ice
#

what happens if noone is online and you reload via console?

haughty musk
#

the game ends

quiet ice
#

I just want to know if you accidentally have a reliance on online players

#

reloading while noone is online would debug that to the fullest

#

shouldn't the class be trashed afterwards so it shouldn't matter?

#

unless of course you have static fields, at which point is may be a bit different

haughty musk
quiet ice
#

the console can dispatch commands while noone is online

novel pendant
quiet ice
#

I'm confused. what is the issue here

novel pendant
#

running a reload on enable would just make a reload loop where it diables the plugins, reenables, runs the reload command again, over and over again

#

when I restart my server, the plugin doesnt launch correctly

#

kinda hard to explain

quiet ice
#

so you want to invoke the reload command or what

novel pendant
#

no, I prefer it just loads up the plugin on restart

#

but it isnt doing that

quiet ice
#

restart as in hard reboot

novel pendant
#

yessir

wild inlet
quiet ice
wild inlet
#

Um, the law?

quiet ice
#

Forge uses mojmap for a few months now

#

They didn't have any issues as of now

wild inlet
#

You can't distribute it at all

#

In any capacity

#

Hence why you need to remap

#

Before using your plugins

#

And you can't use it on the server remapped

quiet ice
#

Yes, but you don't want to mirror the mojmap itself

#

Plus, you can consider anything using the mojmap a derivative work

quiet ice
novel pendant
quiet ice
#

I have no idea how you managed that in the first place

#

Usually it is the reverse

#

make sure you have no semi-depends on online players or anything like that (such as Plugin messages)

novel pendant
#

yeah there are no online player dependants

quiet ice
#

then I guess that the only way of solving it is to put sysout everywhere - the onEnable method looks good to me (though Bukkit.getOnlinePlayers().size() > 0 is less fast than !Bukkit.getOnlinePlayers().isEmpty() - but that is only a nitpick that won't do anything)

#

Could it be that you do not invoke lobbybar.addPlayer(on) on player join?

haughty musk
#

@quiet ice I'll dm you a gif of the problem if thats ok with you

lament minnow
#

it would be nice if a guide existed for converting existing NMS code to be spigot api code

novel pendant
quiet ice
#

Why would you want to do that?

granite stirrup
lament minnow
quiet ice
#

you mean spigot nms -> mojmap nms or * nms -> spigot/bukkit api

#

if latter, then ???

lament minnow
#

i mean taking code in plugins which uses nms and converting it so it uses spigot api instead, because nms usage is discouraged

quiet ice
#

myeah, it is complicated

lament minnow
#

at least, for the code which can be replicated by the api

#

some things can not be

quiet ice
#

The reasons there is no guide on that is that noone wants to do that

lament minnow
#

also because it would probably double as a guide on how to get around mojang obfuscation

#

which may encourage using more nms

eternal night
#

Lol the world in which mojang obfuscations encourage more nms usage is an imaginary one

quiet ice
#

it is, most often worse for performance and the spectrum of NMS is so large that you cannot possibly do a PR here

#

yeah, mojmap did kill quite a lot of plugins

granite stirrup
#

dont think its something with that

quiet ice
#

Your plugin descriptor (also known as plugin.yml) is invalid

granite stirrup
#

version: 1.0
api-version: 1.13
author: GStudiosX
description: TestPlugin
quiet ice
#

you are missing the name entry

granite stirrup
#

oh

lament minnow
granite stirrup
#

didnt realise i forgot it

quiet ice
#

it is strange that bukkit does not provide a more specific error, but eh

upper vale
#

Say I want to send a message about a new rank being created via redis pub/sub, would it be a good idea to cache the rank object on every single server under the ntwork?

quiet ice
#

it is specific enough that at least some will know what the issue is at first glance

quiet ice
upper vale
#

yeah i wont be doing it directly but i was thiking of sending over the data and creating a new Rank object on every single server

#

redis pubsub sounds like a better idea than constantly connecting to the database but eh

#

maybe im not thinking of pubsub the right way?

quiet ice
#

I have no experience with this, so I cannot say anything

dusty herald
#

?ban @leaden wolf

undone axleBOT
#

User with ID 861731031153770546 is already banned.

ashen ice
#

Thanks lol

ancient plank
#

a

ashen ice
#

Imagine pinging everyone, kinda CRINGE

graceful phoenix
#

Third day in a row.

covert valve
#

who did the ping

west shoal
#

Again?

lost matrix
graceful phoenix
ashen ice
#

Discord needs to add a max member ping rate

quaint mantle
#

what happened?

ashen ice
#

Since youll just get people botting servers now with spam pinging individual members

dapper dome
quaint mantle
#

wow, third day in a row

raven zealot
#

hmmmmm

#

who dare ping me!!!

austere cove
#

I do love getting pinged for no reason

hybrid spoke
#

who pinged me

quaint mantle
#

mass ping

austere cove
#

entitled kiddos s m h

#

spam bot/kiddo

quaint mantle
#

Gaain

vital swift
#

who tf

hybrid spoke
#

ah

quaint mantle
#

Hey Steel PU_PepeWave

#

where've you been

austere cove
#

Hi

quiet ice
#

good thing I do not get pinged

austere cove
#

I've been athome like a good citizen

hybrid spoke
quaint mantle
#

ok

#

i get pinged every time

quiet ice
austere cove
#

thank god discord fixed ghost pings years ago

#

👀

quaint mantle
#

why would someone have the motivation to mass ping a development server anyways

quaint mantle
#

fr

quiet ice
#

not like in IRC where ghost pings are not possible

austere cove
#

ads most likely

quaint mantle
#

861731031153770546

austere cove
#

how did you know my bank balance?

timid kestrel
quaint mantle
#

error in your SQL syntax; check the manual that corresponds to your MySQL server version

timid kestrel
#

Yeah but there's not though

opal juniper
austere cove
#

unrelated to your problem, but why are you throwing an ArithmeticException, and why are you not storing UUIDs in a BINARY(16)?

young portal
#

why do i get ghostpings every now and then

#

stop

opal juniper
#

its a mass attack

#

although it seems they target the coloured roles (not blue)

quiet ice
#

I assume that they target everything that is around the top of the user lsit

opal juniper
#

yeah

austere cove
#

anyways split up your queries

#

or make sure your connection allows multiple queries

sharp bough
#

how do interfaces work , and how can i do something without any real code

#

take this for example

#

it has no code

#

yet it works?

austere cove
#

it's an API

sharp bough
#

yea

austere cove
#

it doesn't tell you how anything works

#

just what functions it has

sharp bough
#

nono not the plugin

#

the api

#

how can a function do something without code?

austere cove
#

That repo is just the API

#

not the actual plugin

sharp bough
#

yes

opal juniper
#

You need to download it from the releases and then use the jitpack repo

sharp bough
#

but im not interested on the API

#

i dont understand how it works

opal juniper
#

Right

#

So it doesn’t

#

That code there

#

Is just for you to look at

#

The dev removed all logic

austere cove
#

just like when you look at Bukkit repository, most of it are interfaces. The Craft classes like CraftServer are not part of the API

ivory sleet
#

Lucas google how java interface works

sharp bough
#

thats why im asking

ivory sleet
#

Asking what

opal juniper
#

How it works

quiet ice
#

what you are seeing is abstract methods

quaint mantle
#

was there another mass ping?

quiet ice
#

yes

opal juniper
#

Yeah

quaint mantle
#

jesus

sharp bough
#

idk im kinda lost, whats an abstract class and how can it be abstract, how can something work without any code, whats the logic behind it,

#

is the one in w2schools

quiet ice
#

abstract methods NEED to be overridden by any classes that extend/implement the interface/abstract class or need to be abstract themselves

ivory sleet
#

Abstract classes and interfaces can declare abstract methods which have to be implemented of any concrete class that derived from them

clear galleon
ivory sleet
#

It’s more than just organizational

quiet ice
#

It is basically required for stuff like bukkit

sharp bough
#

oh