#help-development

1 messages Β· Page 686 of 1

onyx fjord
#

can you send me a snippet

green plaza
#

Snippet of what?

onyx fjord
#

of your code

#

like a single class

#

or yk what

#

dont

#

screenshot your code structure

#

all the packages

green plaza
#

Why would i do that?

#

Okay wait

onyx fjord
#

you know, the intellij sidebar

green plaza
#

Ik

#

how can i post here screenshot?

#

What the link to post it?

onyx fjord
#

you just post it

green plaza
onyx fjord
#

can you screenshot af ew lines higher

green plaza
onyx fjord
#

lets see

green plaza
#

Mircrosoft on their way to sue me for stealing their code io io io

#

Even the packets are diffrent then in minecraft bcs it handle 1.8-1.20

#

XD

tender shard
#

as I already mentioned, you will not be able to sell anything like a custom server software on spigotmc.org - you can only sell plugins on spigotmc that run using spigot

green plaza
river oracle
#

oh boy I love spigot how could I have gone a week without this type of stuff

#

never going on vacation again

green plaza
#

What?

onyx fjord
#

and why do you want to sell it on spigotmc

green plaza
#

It was mb

tender shard
#

I'd love to see the result

onyx fjord
#

its not like you need the deobfuscated code to reverse engineer

green plaza
onyx fjord
#

you will eventually publish it tho

onyx fjord
#

it doesnt take a big part in the transaction

#

its just a forum where you can sell your thing

#

spigot takes no cut

#

and only verifies if the payment was done / refunded

tender shard
#

if you want a real marketplace, use mc-market or however it's called meanwhile

onyx fjord
# tender shard sad

||hes scared that someone in this chat will break his unbreakable obfuscation||

remote swallow
#

built by bit

onyx fjord
green plaza
onyx fjord
#

exactly

#

it will be cracked if people are actually interested in it

#

its a matter of time

green plaza
#

But its not rly even obfuscator that system u put your app thorugh and its not only for java but for every other programs too

onyx fjord
#

what is it then

#

asm?

#

no wait

#

what is it called

#

jnic

green plaza
#

RN its only for private usage

#

For friends etc.

#

My friends actually develops it

#

And it will be avilable for everyone later

#

There are still some things to do with this

onyx fjord
#

but is it native

green plaza
#

Kinda

onyx fjord
#

then prepare for a wave of unhappy customers

#

because it doesnt work on their architecture

tender shard
#

i hope someone comes around with an actual dev question, because this current discussion is pretty pointless and off topic

onyx fjord
#

why not just code the server in c++ then

smoky oak
#

how about you help me with the attributes thing

tender shard
smoky oak
#

fair

tender shard
#

maybe ask on the forums

shut solar
#

is it possible to send a CustomPayloadPacket to a channel without getting the player? Because I would like to send my payload packet with PacketStatusOutServerInfo (server motd, players etc.)

green plaza
#

If someone cames with dev question i don't rly want to answear it bcs its might help someone to crack it

lost matrix
#

What are we discussing rn? πŸ™‚

opal carbon
#

oh another 1.8 fork

#

we really dont need more of those

onyx fjord
green plaza
remote swallow
river oracle
#

how should I distribute my maven multi-module project, not really set this up before

tender shard
lost matrix
# onyx fjord obfuscation!

Ah, a classic i see. Im pretty sure everyone has already stated this buit let me throw in my two cents:

  • Dont bother
tender shard
river oracle
tender shard
#

have you read my blog post?

river oracle
#

nah

#

could you send it

tender shard
#

Hi there! Today I’m going to explain how to setup a multi-module project using maven to support different NMS versions. Important notes about this tutorial: Every step will have detailled screenshots using IntelliJ. I explicitly chose not to include everything as copy/pastable source code, but normal screenshots (you can click on them to show th...

smoky oak
tender shard
#

it's pretty long lol

onyx fjord
#

if using gradle you can look at antipopup

remote swallow
river oracle
#

πŸ€·β€β™‚οΈ not a huge deal

#

I prefer maven for many things

lost matrix
opal carbon
tender shard
opal carbon
#

but theres a bazillion random ass 1.8 forks out there that markets way oversaturated with mostly useless crap

kind hatch
smoky oak
#

I'm referring to this one

onyx fjord
opal carbon
#

W

tender shard
remote swallow
#

you shade in parent module instead

tender shard
#

you cannot shade in the parent module because the parent module does have pom as packaging

remote swallow
#

for gradle you shade in parent

#

bc packing stuff isnt a thing

tender shard
#

but we talk about maven

kind hatch
#

Also Alex, why is your cookie banner broken? It won't met me view the cookie settings. 😠

ivory sleet
#

but ye its possible

river oracle
kind hatch
#

Vivaldi

lost matrix
#

The ItemStacks attribute modifiers are applied to the players attribute modifiers while he holds them.
So if you want to make an axe swing quicker, then you need to modify its attributes.
If you want to increase the attack speed accross the globe by a percentage, then you should add a
multiplicative modifier to the player (0.0 - 1.0)

remote swallow
#

shadow hows ur javadoc update coming

tender shard
green plaza
tender shard
#

well cookie banner works on chrome, firefox and safari, I haven't tested any other browsers

smoky oak
kind hatch
chrome beacon
#

Chrome fork that borked smth

opal carbon
tender shard
#

idk, I haven't written the cookie banner plugin, just used an existing one

lost matrix
smoky oak
#

making axe swing speed a uniform value

#

here 1.6

#

as a test

lost matrix
#

Then you need to modify every axe that comes into the game

green plaza
#

So players can join on multiple versions

opal carbon
#

what features does it support tho

#

does it have the nether update stuff and caves and cliffs stuff

chrome beacon
#

What does it do better than ViaVersion

smoky oak
#

id just smack it onto the axes otherwise

#

but keeping track of items is incredibly difficult

chrome beacon
#

Why is it paid and forced to use your server jar

bitter rune
#

runtasklater. i have the delay set to 180l i forgot how many seconds this is

lost matrix
smoky oak
#

yea thats been my original idea, then it didnt do squat

#

but with you pointing out the percentual multiplier being the requirement i can probs do some shady math and use that

opal carbon
#

if it supports latest versions and its features maybe it would be remotely interestinf but if its just going to let you play ancient features ehhh

kind hatch
bitter rune
#

thank you

green plaza
green plaza
#

Its basicly a proxy

opal carbon
#

proxy to what version though

chrome beacon
#

So ViaVersion

opal carbon
#

1.8

tender shard
opal carbon
#

or something recent

tender shard
worldly ingot
#

That's something I've kinda wanted to do for some time now but felt it wasn't urgent enough for me to actually do it

green plaza
green plaza
chrome beacon
opal carbon
#

so it supports camels and shit

river oracle
#

when is 1.20.2 supposed to come around

kind hatch
green plaza
opal carbon
#

does your server software have camels yes or no

tender shard
#

my local zoo does have camels

chrome beacon
#

It doesn't it's your classic 1.8 fork

tender shard
#

my neighbour smokes camels

chrome beacon
#

With builtin plugins

green plaza
#

Like captcha where u click to verify

opal carbon
#

...

#

does it have camels

remote swallow
#

seen before

green plaza
#

No it does not

#

U have to have picutres with camels

tender shard
#

nobody wants to play on a server that doesn't have camels

onyx fjord
#

So it's basically a proxy with captcha

opal carbon
#

ok im just tryna figure out what version it is and you said 1.8 to 1.20

onyx fjord
#

You know that exists already

tender shard
#

camels are the essential essence of minecraft

opal carbon
#

im glad we know you dont have camels now

onyx fjord
#

It's called nanolimbo

opal carbon
green plaza
#

XDDDDDD

#

Yea i copied nanolimbo 1:1

onyx fjord
#

What's what it looks like

tender shard
onyx fjord
#

Just another limbo

tender shard
#

everytime I play survival, my only goal is to find a goat horn

chrome beacon
#

Not even Minestom based limbo

opal carbon
#

and a camel

green plaza
#

I will add cammels

#

I swear

onyx fjord
#

Your captcha will be easy to break with AI btw

green plaza
#

Next to this captcha wall will be hanging cammel

onyx fjord
#

It takes 1 mod to make

#

So it's not better than any other captcha

green plaza
#

Good potential user has 3 or 4 captcha modes to choose

#

4

#

4 modes

#

It can be random for every user

chrome beacon
onyx fjord
#

Then mod can handle all of them

green plaza
#

Go write a mod

onyx fjord
#

You don't need captcha if you use online mode

onyx fjord
opal carbon
#

make a captcha where you have to know which images are camels

tender shard
#

ITS CALLED GNU

onyx fjord
#

Gnu project?

green plaza
green plaza
#

Even after changes

onyx fjord
#

Unfortunate

green plaza
#

Honestly after changes i thought i will change up myself

#

But to my very suprise not every server implemented this

onyx fjord
#

Because it's not efficient

green plaza
#

If u have online mode off u need to fuck with this

kind hatch
#

Sounds like a simple solution to me. Just do online mode. πŸ˜›

tender shard
#

yeah then you also don't have to deal with 90% of bots and cheaters

#

online mode is such a blessing

#

oh also all those 11 year old wannabes don't join anymore because well they cannot afford the game and/or daddy doesnt allow them to use their credit card

#

so online-mode is a win/win for both devs and admins

smoky oak
# tender shard yeah then you also don't have to deal with 90% of bots and cheaters

funny story about online mode: Had this in my log 2 days ago

[16:52:47] [User Authenticator #3/INFO]: Disconnecting /198.199.72.162:53202: Failed to verify username!
[16:52:47] [User Authenticator #3/ERROR]: Username 'Herobrine' tried to join with an invalid session
[16:52:47] [Server thread/INFO]: /198.199.72.162:53202 lost connection: Failed to verify username!

There was another bot that joined like 3 minutes later, said 'your ip is exposed', and left

topaz cape
#

why could this could be not working o.o

remote swallow
#

cant you use ProxyServer.getProxy

#

also check its registereed

#

if needed

tender shard
tender shard
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.

topaz cape
#

smh

tender shard
#

which library is that even? Protocolize?

topaz cape
#

ye

tender shard
#

show how you register it

topaz cape
tender shard
#

UPSTREAM

#

not DOWNSTREAM

#

Client -> Proxy is UPSTREAM

#

isnt that what you wanna catch

topaz cape
#

my bad

tender shard
topaz cape
#

thats the example i looked into

#

xd

#

pretty much my bad

tender shard
# topaz cape

eah that looks like it changes actionbar messages sent from spigot to chat messages on client

topaz cape
#

yup

#

thanks @tender shard its now working πŸ˜„

smoky oak
#

random thought, how slow/fast is Tag.ENTRY.contains(Material) compared to a fall-through switch? I might have to register numbers for every type of a particular tagged item

topaz cape
#

thank you as well @remote swallow πŸ˜„

tender shard
#

also the tag will be working on all versions

smoky oak
#

uh mind elaborating what that is? a datapack i mean

tender shard
#

e.g. imagine you wanna check all items an enderman can hold
you could do it like this

public static boolean isEndermanHoldable(Material mat) {
  switch(mat) {
    case GRASS_BLOCK:
    case ...:
      return true;
    default: return false;
  }
}

Now there could be a datapack that allows enderman to also hold diamond blocks - your plugin will assume it's not "enderman holdable". If you'd use Tag.ENDERMAN_HOLDABLE, it'd work

#

also in a new version, there could be a new material that enderman can hold - tag will work, your code will have to be adjusted

tender shard
smoky oak
#

im an idiot

#

i knew that

#

english is hard

#

i thought you meant a programming thing lol

tender shard
#

a tag internally always uses CraftMagicNumbers.getBlock(Material) to turn the material into an NMS block so it does a lookup from the huge Material,Block HashMap

#

you can however easily avoid that by turning the tag into a set yourself that only contains what you need:

#
Set<Material> endermanHoldables = new HashSet<>(Tag.ENDERMAN_HOLDABLE.getValues());
#

could even use an EnumSet in current versions

tender shard
subtle folio
#

when will minecraft have an official documentation for using their system (real no scam)

tender shard
worldly ingot
#

You won't get much benefit out of enum collections for Material anyways

#

A hash collection would probably be better for few entries

#

The universe is just too large

slender elbow
worldly ingot
#

It should also just be fine to use boolean operands if you don't care about the unboxing. Game rule values shouldn't be nullable, right?

slender elbow
#

if you do == false it'll try to unbox it

slender elbow
worldly ingot
#

Weather boi? PES2_Uhm

tender shard
# worldly ingot The universe is just too large

minecraft worlds can be 60,000,000^2 * (64 + 256) blocks in size, so 1152000000000000000 (1 billion billion) cubic meters. the obversable universe is roughly 4x10^80 cubic meters. So roughly 347222222222222222222222222222222222222222222222222222222222222 minecraft worlds would fit into the universe.

worldly ingot
#

I meant the Material enum universe

#

lol

tender shard
#

i know but I thought about universe size when you said it

#

and I just had to know

glad prawn
#

he calculates it 😭

tender shard
tender shard
glad prawn
#

i always hate math

tender shard
#

imagine if every minecraft world we built becomes reality in a parallel universe - minecraft is just a portal in the matrix

quaint mantle
#

is this a bug, my interface is annotated with @Nonnull, but it suggests @NotNull

blazing flare
#

When creating a recipe with ExactChoice, clicking on the item in the recipe book would not recognise I have the items. Is that how it's supposed to be and if so, can it be fixed or would that be hard on the server side to compare all item stacks in the player's inventory?

blazing flare
#

No, and the recipe itself works if I manually place the items, it just doesn't detect that I have said items via the recipe book.

tender shard
#

then it should work - it always worked for me, at least on 1.17+

wet sparrow
#

Hello

glad prawn
wet sparrow
#

I'm having a problem making teams from a Queve. It only makes me teams of 1. Could someone help me?

whole surge
#

Hello. How can I give group to unregistered (player that never joined) user in luckperms ?
Or otherwise how do i register user in luckperms or something with code?

bitter rune
#

How do I define an itemstack? I just want to drop certain items on the ground. I tried using material. Name but that isn't an item stack

worldly ingot
#

new ItemStack

#

It's just an object you can create an instance of

vapid grove
#

I understand that showing the item is just an Item, but the other objects dont seem like that

#

Is it armor stands or something

worldly ingot
#

Yes, armour stands

#

In modern versions you can use display entities which will give you a lot more power with your animations

vapid grove
worldly ingot
#

https://www.youtube.com/watch?v=6bg3O6u-ZzQ should give you more information in display entities

Here's a quite wild snapshot for map makers. 23w06a has new display entities, data driven damage and a new damage command, among a lot of other changes and fixes. Check it out! #minecraftemployee

slicedlime works as a Tech Lead for Minecraft at Mojang, but the YouTube and Twitch channels are personal projects run entirely in his spare time. Thi...

β–Ά Play video
#

And Bukkit has Display entity classes, one for each type of display entity

young knoll
#

Display entities are amazing

vapid grove
vapid grove
#

Thats forsure

#

I cant seem to access them. Is api version 1.20 sufficient?

#

Intellij is telling me the classes dont exist

young knoll
#

Yes

vapid grove
#

Do I just access it with ItemDisplay?

young knoll
#

Yes

vapid grove
#

yeah intellij is being dumb

#

it cant find the class

#

nvm i see the issue, spigot versions too old

#

yep its fxied now, which also fixes my issue of me not being able to access armor trims

blazing flare
# tender shard then it should work - it always worked for me, at least on 1.17+

Sorry for the delayed reply. I'm on 1.20.1 but the same occurs in 1.19.4. Are you sure that it works when clicking on the recipe book itself? It works perfectly fine when it's a MaterialChoice, just not with ExactChoice. So as a test, these two planks exist in my inventory but it doesn't detect that I have them in there. Manually placing the items works fine, even when it's shapeless too. Any thoughts?

vapid grove
vapid grove
# young knoll Yes

Bigger issue now.
After reloading intellij, all my package files are gone.

#

I only see pom.xml, and dependancy reduced pom

#

but If i check my system, the files still exist\

young knoll
#

Invalidate caches and reload maybe?

#

Idk I don’t use Intellij

vapid grove
#

nope

glad prawn
#

Is it really possible to craft without putting blocks in it

young knoll
#

No

vapid grove
#
<dependency>
            <groupId>org.spigotmc</groupId>
            <artifactId>spigot-api</artifactId>
            <version>1.20.1-R0.1-SNAPSHOT</version>
            <type>jar</type>
            <scope>provided</scope>
        </dependency>

All I did was change 1.19.1 to 1.20.1

young knoll
#

That’s the ghost recipe

vapid grove
#

why does things need to break aaaaaaa

blazing flare
vapid grove
#

fixed it by deleteing the .idea file

#

which is a really stupid fix

brazen badge
#

org.bukkit.plugin.InvalidPluginException: java.lang.NullPointerException: Cannot invoke "me.workwolf.timetovote.TimeToVote.getConfig()" because "me.workwolf.timetovote.utils.Messages.plugin" is null

Messsages.java:

private static TimeToVote plugin;

    public Messages(TimeToVote plugin) {
        Messages.plugin = plugin;
    }

TimeToVote.java:

Messages messages = new Messages(this);
robust helm
#

also why is the TimeToVote field static

brazen badge
robust helm
#

what error?

#

anyways, can i see the code, where u call getConfig()?

brazen badge
#
package me.workwolf.timetovote.utils;

import me.workwolf.timetovote.TimeToVote;
import org.bukkit.configuration.file.FileConfiguration;

import java.util.List;

public class Messages {

    // private TimeToVote plugin;
    private static TimeToVote plugin;

    public Messages(TimeToVote plugin) {
        Messages.plugin = plugin;
    }

    public Messages(TimeToVote plugin) {
        Messages.plugin = plugin;
    }

    public static String getPrefix() {
        return plugin.getConfig().getString("prefix");
    }

    public static int getTimeToVote() {
        return plugin.getConfig().getInt("time-to-vote");
    }

    public static int getVoteDelay() {
        return plugin.getConfig().getInt("vote-delay");
    }

    public static boolean getDisableChatWhileVoting() {
        return plugin.getConfig().getBoolean("disable-chat-while-voting");
    }

    public static List<String> getDisabledWorlds() {
        return plugin.getConfig().getStringList("disable-worlds");
    }

    public static String disabledWorldMessage() {
        return plugin.getConfig().getString("disabled-world");
    }

}
robust helm
#

seems like u called one of these methods before initializing the class

#

thats why u shouldnt use static like that

brazen badge
robust helm
#

ye cuz u have to make all methods non - static

kind hatch
#

?di

undone axleBOT
robust helm
#

You're supposed to access all these methods through instance. I'd make everything non static, and in ur main class u make one field with an Instance for that so ```java
private Messages messages = new Messages(this);

public Messages getMessages(){
return messages;
}

kind hatch
#

What?

glad prawn
#

Why static?

robust helm
#

ye idk u could also use the instance

#

but then it would be much more complicated to acces it

kind hatch
#

Not really.

robust helm
#

edited

brazen badge
#

I want to create a Messages class where plugin is passed in and I create functions where I take messages from the configs

slender elbow
#

now that is an exaggeration if i've ever seen one lol

kind hatch
proven jay
#

Hey, I'm using MongoDB and I have a database made on MongoDB Atlas and it looks like my server is making a lot of connections to it when it should only have one to it

robust helm
kind hatch
#

new

robust helm
#

whoops. too much used to kotlin

brazen badge
#

Messages messages = new Messages(this);

#

I already have

kind hatch
vestal matrix
#

how would i get a player's name using their uuid

#

because

            player.getName();``` just gives me the uuid
vapid grove
#

can someone explain what setting something as persistant does

#

Entity.setPersistant to be exact

naive loom
vestal matrix
#

also .getPlayer() wont work on offline players

vapid grove
#

getDisplayName()?

#

or does that only apply to online users

vestal matrix
#

only online

vapid grove
#

hm

naive loom
#

or create your own cache with uuid to username

vestal matrix
naive loom
#

the mojang session server has a route to get a username from a player's uuid

#

if it still exists idk if microsoft took that down

vapid grove
#

the docs just say it makes it persistant or not

#

but i litterally have 0 clue what that means

naive loom
#

i just realized that my response was removed

vapid grove
#

and im 90% sure the definition of the word doesnt mean the same thing in this case

naive loom
#

when i sent it

vapid grove
naive loom
#

i sent a question of mine and answered yours

#

pretty sure it means it persists, which would mean it would probably be there on restart / next server boot if the entity is still alive on shutdown.

vapid grove
#

i dont want that lmao

undone axleBOT
bitter rune
#

i dont even know the correct termonolgy for this... how do i go about making a list of materials? a list in which i can use Random var = new random(); on it.

vapid grove
#

you making a daily rewards thing or smth

bitter rune
#

getting a list of materials so i can drop a random material on event

vapid grove
bitter rune
#

same chance

vapid grove
#

make an arraylist<ItemStack>, add the items you want into it
then, use new Random().nextInt(arr.size-1) to get the random item

distant wave
#

i havent make my double jump yet, is it possible by any way to make it work without using flight in any way

bitter rune
#

okay thank you

vapid grove
distant wave
#

which is usually

#

done with

#

flight

vapid grove
#

thing is, the best way i can think of is having a physical item called double jump (a feather or smth)

#

and right clicking midair to use

#

obv you can use flight to detect that

#

but hn

distant wave
#

the way its normally done if you allow player to flight but then cancel it etc.

vapid grove
#

what id do in that case is use the move event

#

and if the player is on air

#

enable flight

#

then do your flight checks, add a 10 second cooldown for enabling flight inside that move event

stray nacelle
#

helo guz

#

cam someone recommend way to smoothly move players camera?

strong parcel
#

I added a plugin as a dependency, and I am trying to use a method from it now. However, I am getting a null argument exception when the method tries to create a NamespacedKey by grabbing the plugin object.

#
        NamespacedKey materialKey = new NamespacedKey(TWClaim.getPlugin(), "material");
        NamespacedKey key = new NamespacedKey(TWClaim.getPlugin(), "reinforcement");
        NamespacedKey ownKey = new NamespacedKey(TWClaim.getPlugin(), "owner");```
#

So the plugin calls the cancelBreak method, which belongs to the dependency, and the method involves calling TWClaim.getPlugin(), which is supposed to return plugin but returns null. Does anybody know why?

#
    public static Plugin getPlugin() {return plugin;}```
kindred pasture
#

Hey guys im trying to generate a tree at the location of a sapling with block.getWorld().generateTree(block.getLocation(), treeType); and its not doing anything. Does anybody have experience using generateTree and know why that might be?

#

I've confirmd the method is being called. Do I need to make the sapling an air block first?

flint coyote
kindred pasture
#

what about grass?

flint coyote
#

Yeah should also work. And yes you could try to have an empty (air) block instead of a sapling

kindred pasture
#

im testing this with a jungle sapling on grass using SMALL_JUNGLE

#

0h ok

#

let me try setting it to air first. Should the location be the air block where the sapling was? or the grass block below the sapling?

flint coyote
kindred pasture
#

ok ill try setting it to air first rn

flint coyote
kindred pasture
#

Omg it worked! LOL thank u sm!

gleaming grove
#

Is still 5MB limit for the plugin size? If so is there option to download dependencies while plugin is awakening?

vapid grove
#

Is there a way to get an entities rotation? (yaw and pitch)

#

Cant find a method for it in the docs

smoky anchor
#

getLocation().getYaw() I think
or getEyePostition if normal entities have it, I know player does

echo basalt
#

LivingEntities have it

#

But yeah yaw and pitch is present in the entity's location

echo basalt
tender shard
#

oh wait the example recipes spexifically NOT use themselves as ingredients lmao, but I'm sure I tried that later too. One second, I'll open 1.20.1 and IJ

stray nacelle
thin imp
#

Hey can anyone help me?

I just want to remove all commands that start with /. but it doesn't work.

Version: 1.19.2

        ProtocolLibrary.getProtocolManager().addPacketListener(new PacketAdapter(this, PacketType.Play.Client.TAB_COMPLETE) {
            public void onPacketReceiving(PacketEvent event) {
                if (event.getPacketType() == PacketType.Play.Client.TAB_COMPLETE && event.getPacket().getStrings().read(0).startsWith("/")) {
                    event.setCancelled(true);
                }
            }
        });
sullen marlin
#

PlayerComnandSendEvent

thin imp
#

and for the Bungee Commands?

tender shard
tender shard
#

yes definitely, the recipe itself also works fine, just the client won't suggest to put any NBT'ed items into the slots at all

#

although it does understand that it requires a custom item, SHINY DIAMOND in my case, it will only show/suggest that if you don't have any matching non-NBTed item of the same item. But if you don't have any non-matching item, it correctly shows the actual ingredient, but then claims you have none

chrome beacon
#

Yeah client issue

tender shard
#

i'm pretty sure that it used to work fine some time between november 2021 and may 2022 (so 1.18 or sth)

left depot
#
Chat.isConfigurationSection("Channels." + args[0])

Why does this not work?

tender shard
#

what is "Chat"?

#

is that a class?

#

and isConfigurationSection is a static method?

left depot
#

ChatManager.getInstance().getChatchannels()

tender shard
#

so "Chat" is an object and hence should be called "chat" and not "Chat"

#

also:

#

?notworking

undone axleBOT
#

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

left depot
#
FileConfiguration Chat = ChatManager.getInstance().getChatchannels();

if(args.length == 1 && Chat.isConfigurationSection("Channels" + args))

& it is a static methode

(No Console errors)

tender shard
#

imagine args[0] is "asd" - does your config actually look like this?

Channels[asd]:
#

because first of all, you're missing a dot between "Channels" and the sub-name, and second args is an array

left depot
#

Channels:
~~
global:
Channelname: "Global"

tender shard
#

and as I already said, it must be called "chat" and not "Chat"

#

well then you would have to check for "Channels." + args[0]

#

and if the configurationsection that you happened to call "Chat" instead of "chat" is already the whole "Channels" section, then ofc you must not prefix the parameter for isConfigurationSection with "Channels." again

left depot
#

okay

#

it worked πŸ‘

glad prawn
#

Delete really fast

chrome beacon
#

Why do you have a bunch of line breaks

glad prawn
#

But why u have another forEach inside?

tender shard
#

what is that even supposed to do? your variable names are so weird too

#

and why do you loop over all players inside the loop where you already loop over all players

#

what is finalWorld2 for

#

what is "paa"

glad prawn
#

Wtf

tender shard
#

also there is no method called getplayers()

#

the whole code is cursed, idk what the goal is in the first place

glad prawn
#

Yes 😭

chrome beacon
#

Well that's not getplayers() that's getPlayers()

#

code doesn't care if it's the same word it needs to be exactly the same

ivory depot
#

Hi, it is possible to shadowjar only one dependency?

#

i use gradle

tender shard
#

no, p and P are not the same

#

I already told you not to nest the loops

#

you loop over all players and then loop over them again in the loop

#

why?!

chrome beacon
#

You haven't given us enough code to help

tender shard
glad prawn
#

Weirdest code πŸ€“

chrome beacon
#

We did point out the error in the code code you sent

#

but you decided to get mad instead

#

I'll just skip helping you

tender shard
#

same

#

your code is a horrible mess, you seem to lack basic knowledge about java, you didnt even properly copy/paste your current code but instead typed it again here without a code block

#

and you keep describing your issue with "not working"

#

?notworking

undone axleBOT
#

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

tender shard
#

good luck πŸ‘

glad prawn
#

He will get the same, i'm sure.

ivory depot
chrome beacon
#

Honestly it depends on what the class is used for

near crypt
#

how can I make every entity with a specific tag glow?

smoky anchor
#

iterate over all entities, check for tag, give glow

near crypt
smoky anchor
#

I don't think it really matters in what way/how you iterate

near crypt
#

``for (Entity entity : player.getWorld().getEntities()) {

    }``
#

like this?

smoky anchor
#

ye that will work
btw, for next time

#

?codeblock

undone axleBOT
#

You can use the discord code block format to display code or just text in a more pleasing way:
```java
public class MyPlugin extends JavaPlugin {
@Override
public void onEnable() {

}

}```
Becomes:

public class MyPlugin extends JavaPlugin {
    @Override
    public void onEnable() {

    }
}```
kindred sentinel
#

How to remove autocompletion of commands like /pluginname:command, and leave only /command?

young knoll
#

Or disable them in spigot.yml(?)

kindred sentinel
tender shard
#

or just keep it enabled because that's the intended purpose for when two plugins register the same command

kindred sentinel
plain plaza
#

Yet again, things like muting the chat and being able to bypass it with /me, there are some exceptions.

young knoll
#

What

hybrid spoke
#

yes

plain plaza
tender shard
#

anyone knows why this keeps happening everytime I do Git -> Share project on Github?

hybrid spoke
#

invalid token maybe

#

what does the error message say

tender shard
#

it created repo fine and if I then commit again, it also works fdine

quaint mantle
#

what does it say the

#

then

kindred sentinel
#
event.getCommands().removeIf(command -> command.toString().contains(":"));
plain plaza
#

Have you tried it?

#

And what exactly are you trying to accomplish?

kindred sentinel
hasty prawn
#

Do what Coll said and just disable them

kindred sentinel
hasty prawn
#

That's not what I meant, in the spigot.yml you can just disable all namespaced commands

#

commands.send-namespaced: false

tender shard
#

I'll check next time

glad prawn
#

damn

kindred sentinel
#

So i did something and now it works..

hushed spindle
#

is there some event called when a plugin sends a title to a player or would i have to read packets for that? i would like to use titles/action bars to display certain information, but not interrupt such messages from other plugins

near crypt
#
@Override
    public boolean onCommand(CommandSender commandSender, Command command, String s, String[] strings) {
        if(!(commandSender instanceof Player)) return true;
        Player player = ((Player) commandSender);
        for (Entity entity : player.getWorld().getEntities()) {
            if(entity.getScoreboardTags().toString().equals(BlockDisplayer.getInstance().getConfig().getString("converter.tag"))) {
                entity.setGlowing(true);
            }
            new BukkitRunnable() {
            @Override
              public void run() {
                   entity.setGlowing(false);
                }
             }.runTaskLaterAsynchronously(BlockDisplayer.getInstance(), 20*3);
        }

        return false;
    }``` Why is nothing happening when i execute the command?
lilac dagger
#

Debug your code

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.

hushed spindle
#

im pretty sure that doing getScoreboardTags().toString() does not output what you expect it to output

upper hazel
#

hey <dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>8.0.26</version>
</dependency> - this need for hibernate ?

near crypt
chrome beacon
#

Yeah getScoreboardTags is a list of tags

#

so you can't just call to string on it

hushed spindle
#

getScoreboardTags() returns a set of strings, calling toString will simply output a set object without any actual info

#

so it will basically never match your config value

near crypt
#
if(entity.getScoreboardTags().contains(BlockDisplayer.getInstance().getConfig().getString("converter.tag"))) {
                entity.setGlowing(true);
            }``` so that would be better
lilac dagger
#

Try it

rugged widget
#

Hey is there a way to see when a player used a specific item on a specific block ?
(Create Mod) I'm trying to see when people use a water bucket on an item drain

Thank you!

lilac dagger
#

Interactevent

rugged widget
#

Yeah but I don't see any methods that could help me out

rotund ravine
lilac dagger
#

Getclicked block and player get inv get item in hand

rotund ravine
#

Interact wprks too tho

young knoll
#

Create mod?

rugged widget
young knoll
#

Sir this is spigot

smoky anchor
#

?whereami

rotund ravine
#

Then just interact

upper hazel
#

tell me I don’t understand why when creating dependencies for the plugin you need to download jar and in other cases you don’t need to download jar supposedly everything happens through maven

#

the same worldguard api needs to be downloaded, but hibernate does not

#

wth

young knoll
#

What

upper hazel
#

what

eternal night
#

what ?

smoky anchor
#

what

eternal night
#

hibernate is shaded into your plugin jar. worldguard api isn't, the classes exist in the worldguard plugin that you run alongside your plugin

hushed spindle
#

can anyone confirm if PrepareItemCraftEvent#isRepair() recently decided to stop working all of the sudden

young knoll
#

Hibernate can be downloaded by the library system because its a library

#

WorldGuard is another plugin that needs to be loaded as a plugin

hushed spindle
#

this one method is now outputting false even if its literally a repair recipe, at least 1.16-1.19

upper hazel
eternal night
#

maven is a build system

upper hazel
#

i mean why i need add hibarnate in maven if this exists in core java

young knoll
#

It doesn't

upper hazel
#

hibernate not core yes?

#

not in core

#

if it's not in the core why then you don't need to download the jar itself

#

worldguard api not in core too

#

but this need in server

#

I was told if the api is in the core, then you do not need to download it. Hibernate is not in the core, so in theory it needs to be downloaded?

young knoll
#

yes

upper hazel
#

what

hasty prawn
#

yes it needs to be downloaded

upper hazel
#

as a jar?

hasty prawn
#

kinda? downloading it as a JAR by itself isn't going to do anything for you. They already gave you two options, use Spigot's Library system to download it or shade it into your plugin with maven

upper hazel
#

here is a simpler question why do we need a worldguard api in the form of a Jar if it is in maven

remote swallow
#

you dont

#

you use the plugin worldguard

#

on the server

upper hazel
#

yes i mean this

remote swallow
#

and you let maven download the api you use

upper hazel
#

hibernate no need use in server

#

load jar end use

remote swallow
#

what

#

hibernate isnt a plugin, so you shade it

#

worldguard is a plugin, and loaded by the server

#

so you dont need to shade it

onyx fjord
#

i have two locations (big dots) that build an area of rectange, what would be the formula to get the length of dotted line?

#

always the shortest one

hasty prawn
#

Math.min(length, height)?

onyx fjord
#

no no those drawings are two different regions

#

they are flat

eternal night
#

compute the height and the width of the rectangle defined by the two points

#

choose the smaller one

#

for the first two points, its the height, for the second two its the width

hasty prawn
tribal venture
#
  • CROSSBOW 1 rarity:3 cost:1
  • ENCHANTED_BOOK{StoredEnchantments: [{id: "minecraft:sharpness", lvl: 3s}]} 1 rarity:100
  • EXPERIENCE_BOTTLE 12 rarity:1 cost:1

^ this is my list of items in an item pool of a hunger game plugin
how do i make the enchanted book usable in anvils?

#

i tried {Item:{id:"minecraft:enchanted_book",tag:{StoredEnchantments:[{id:"minecraft:blast_protection",lvl:1s}]}}} putting the whole thing but it doesnt seem to work

magic glacier
#

im now using intellij idea, but im trying to make an artifact and include mysql-connector in it , how ?

tribal venture
#

ok ill try

quaint mantle
magic glacier
quaint mantle
#

i’ll take as java

magic glacier
#

maven with java the both

quaint mantle
#

i didn’t mean to write java lmao

tribal venture
#

doesnt work

magic glacier
shadow night
#

Just use maven

strong parcel
magic glacier
native bolt
#

Hey does Somebody know why this Import import net.md_5.bungee.api.plugin.PluginMessageListener;Doesnt work on the 1.20

hasty prawn
tawny pine
#

how do i use BLOCK_DUST but spawn the specific breaking particles of a block?

native bolt
#
            <id>papermc-repo</id>
            <url>https://repo.papermc.io/repository/maven-public/</url>
        </repository>
    </repositories>

    <dependencies>
        <dependency>
            <groupId>io.github.waterfallmc</groupId>
            <artifactId>waterfall-api</artifactId>
            <version>1.20-R0.1-SNAPSHOT</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>io.papermc.paper</groupId>
            <artifactId>paper-api</artifactId>
            <version>1.19.4-R0.1-SNAPSHOT</version>
        </dependency>
    </dependencies>

These are my dependencies and Repos

shadow night
#

Someone get the whereami thingy

chrome beacon
#

?whereami

native ruin
#

what is like the difference between the paper and spigot api?

#

paper more optimized ig?

pseudo hazel
#

paper has changed a bunch of stuff from spigot because they could

#

as a result its a bit more performant yes

hybrid spoke
#

paper bad

native bolt
#

So i Should Use the original bungeecord and Its Been solved?

eternal night
#

What exactly is your issue ?

eternal night
#

I mean, that just doesn't exist on either bungee or waterfall `

shadow night
#

Is spigot the only successful bukkit fork?

rotund ravine
#

I think it's the most used one and most active one for now.

shadow night
#

There are other ones?

pseudo hazel
#

probably

onyx fjord
#
  • spigot is bukkit now pretty much
#

the same person maintains both

near mason
#

nvrm

grim hound
#

Can I somehow prevent the server from saving a player's file?

eternal night
#

Call #setPersistent on the player

native bolt
solemn meteor
#

is this the only way to register a commandexec with multiple commands, or is there a better way (within the plugin, not like commands.yml)

   getCommand("cmd").setExecutor(new CommandClass());
   getCommand("cmdtwo").setExecutor(new CommandClass());
grim hound
#

aliases: [ghj, whdjk, whdjkw]

solemn meteor
#

ohh

#

I forgot that existed

#

thanks

grim hound
#

np

grim hound
hybrid spoke
grim hound
#

but he's a different entity

#

Entities don't disappear when they're set to Persistent

#

players... can't really disappear

#

and I guess the entities are additionally saved

hybrid spoke
hasty prawn
grim hound
worldly ingot
#

It works on players too

#

The persistent flag on players controls whether or not to save their playerdata file when they quit. If a player is directly or indirectly riding a non-persistent entity, the vehicle at the root and all its passengers won't get persisted.

hybrid spoke
worldly ingot
#

This should not be confused with LivingEntity.setRemoveWhenFarAway(boolean) which controls despawning of living entities.

worldly ingot
#

Yes :)

grim hound
#

I'll test that right away

#

But their previous saved file will stay, correct?

eternal night
#

yes

grim hound
#

daaaamn, nice

upper hazel
#

well let's say. And I can make it so that I don’t have to download the worldguard api to the server, but at the same time I can safely use it through maven

hasty prawn
#

I mean you could do that, but why? Most servers already have WorldGuard or have absolutely no problem getting it.

grim hound
#

is there a way to completly disable join and leave messages? Excluding packet blocking

austere cove
#

does Map have a method similar to getOrDefault except that instead of giving a default value you give a supplier (i.e. lazy)

#

it doesn't right

lost matrix
austere cove
#

yea not what I need sadge

lost matrix
#

Myeah then there is none

austere cove
#

ill just use get and if null do sth

#

tragic

lost matrix
#

Write your own map impl that wraps another map πŸ™‚

austere cove
#

way too overkill

grim hound
#

you mean like ```java
Supplier<String> www = () -> getWhatever();
map.getOrDefault("zet", www);

lost matrix
grim hound
lost matrix
austere cove
#

it doesnt send blank messages

lilac dagger
#

Is it better for performance to create a static final for funtional interfaces?

#

It should right?

austere cove
#
PlayerJoinEvent playerJoinEvent = new PlayerJoinEvent(bukkitPlayer, joinMessage);
cserver.getPluginManager().callEvent(playerJoinEvent);
if (!entityplayer.connection.isAcceptingMessages()) {
  return;
}
joinMessage = playerJoinEvent.getJoinMessage();
if (joinMessage != null && joinMessage.length() > 0) {
  for (IChatBaseComponent line : org.bukkit.craftbukkit.util.CraftChatMessage.fromString(joinMessage)) {
    server.getPlayerList().broadcastSystemMessage(line, false);
  }
}
#

from playerlist

lost matrix
lilac dagger
#

Oh right, jit does make some stuff pointless i guess

#

I have to study it a bit someday

lost matrix
lilac dagger
#

What about blank

lost matrix
#

One space (" ") will result in a message being sent.

slender elbow
#

pain

worldly ingot
#

Just do what all good Java programmers do and write whatever you want. It'll probably get optimized and if it doesn't, who cares? Kappa

slender elbow
#

for the most part it's true, lol

quaint mantle
#

Is there any list of block sizes?

#

Example grass: 1x1

lost matrix
#

You mean the collision box of a block? What do you mean by size...

worldly ingot
#

Not really, but that does kind of make me want to finally tackle non-cubic bounding boxes for block states

#

I'll write it down and maybe do it when I get back from vacation

quaint mantle
worldly ingot
#

Yeah there's no API for that at the moment and a list really isn't sufficient

#

There is Block#getBoundingBox() but that's just a 1x1x1 cube no matter the block

#

On my TODO list now

lilac dagger
#

Yeah, i tried it ^

#

It would've been nice if followed the shape of the block

eternal night
#

what about collision shape ?

lilac dagger
#

That's what i use myself

#

But from nms

eternal night
#

Block#getCollisionShape is a thing no ?

lilac dagger
#

Is it?

eternal night
#

like on the API layer

#

pretty sure it should be ?

#

yes

#

wow, choco not even knowing spigot api

lilac dagger
#

Worth trying it tho

#

Not sure it works

strong parcel
#

So regarding not being able to call TWClaim.getPlugin(), using Bukkit.getPluginManager().getPlugin("TWClaim") worked.

worldly ingot
#

Oh it does exist. My mistake

#

No clue why that's not on BlockData though

eternal night
#

A great question πŸ™‚

lilac dagger
#

I think it's in block

#

In nms

eternal night
#

actually yea

#

iirc might need some world info

worldly ingot
#

It shouldn't though

quaint mantle
eternal night
#

bamboo shoots iirc

terse ore
#

Does anyone recommend a resource on how to do good counters?

eternal night
#
@Override
public VoxelShape getCollisionShape(BlockState state, BlockGetter world, BlockPos pos, CollisionContext context) {
    return context.isAbove(LiquidBlock.STABLE_SHAPE, pos, true) && (Integer) state.getValue(LiquidBlock.LEVEL) == 0 && context.canStandOnFluid(world.getFluidState(pos.above()), state.getFluidState()) ? LiquidBlock.STABLE_SHAPE : Shapes.empty();
}
#

LiquidBlock

worldly ingot
#

stupid

eternal night
#

Yes XD

tender shard
#

why does recaf add random casts to CharSequence lol

worldly ingot
#

Just being safe

#

String.join() takes a CharSequence so

#

Decompilers tend to be overly cautious when passing in values

tender shard
#

yeah but surely it must know that strings extend charsequence

#

or implements

#

or whatever

worldly ingot
#

It does. But again, just being safe

tender shard
#

that's probably why people sometimes have these random casts in their code - they copy/pasted it from some decompiled .jar lol

lost matrix
worldly ingot
#

Absolutely that's why. You can often tell when code is decompiled code if someone's asking for help on the forums

#

There are some obvious signs that decompilers frequently fuck up

#

Naming variables as the name of the class is usually a big giveaway too. e.g. SuperLongClassName superLongClassName;

lost matrix
#

var1 var2 var3

tender shard
#

btw is there a reason why the Tag class doesn't have a getByName() method? I just checked the code and unfortunately the field names don't always match the vanilla tag names so if I'd pull request it, I#d have to add an additional constructor field and that'd look so ugly

worldly ingot
#

Yeah another one

lost matrix
#

or o1 o2 o3

worldly ingot
tender shard
#

oh great

worldly ingot
#

But you can get them by name now via Bukkit#getTag()

tender shard
#

huh?

#

does that take the vanilla tag name?

worldly ingot
#

Yeah is that not what you want?

cinder abyss
#

Hello, how can I change a sword's damage ? (editable when there is sharpness or any other enchant)

worldly ingot
#

It's not pretty, but yeah. Something like Tag<Material> tag = Bukkit.getTag(Tag.REGISTRY_ITEMS, NamespacedKey.minecraft("axes"), Material.class); would work

lilac dagger
#

What the hell even is a tag?

orchid trout
#

epic

tender shard
carmine mica
#

#BEDS is not the vanilla tag name

lost matrix
lilac dagger
#

Oh right i forgot, it's for pdc

tender shard
carmine mica
#

I think that's a really bad idea. the "bukkit name" is meaningless

tender shard
#

that's a tag

cinder abyss
worldly ingot
#

Vanilla tag names are keyed just like other resource locations

#

They also don't expect the # in front of it

lilac dagger
#

Oh i see

worldly ingot
#

That's just a delimiter

lilac dagger
#

So extra information

left depot
#

Need help one more time,

FileConfiguration chat = ChatManager.getInstance().getChatchannels();
            FileConfiguration playerdata = PlayerDataManager.get();

String permission = String.valueOf(chat.getConfigurationSection("Channels." + playerdata.getString("Channel") + ".Permissions"));

Error: It will not be a Configpath ^^

console errors: None

austere cove
#

mojang implementing tags after oredict has been around since forever for modded

worldly ingot
#

Well oredict is modded lol

#

Now there's a vanilla solution

lost matrix
austere cove
#

yea but it's always funny to see vanilla copying modded features

#

speaking of which, recipe book is absolutely terrible if you're used to any NEI/JEI etc mods

lilac dagger
#

Why not afterall if it's a good idea

worldly ingot
left depot
tender shard
worldly ingot
#

PR access to stash I mean

tender shard
tender shard
#

the PR looks fancy!

worldly ingot
#

So yeah, at least for the time being, my example above would work

#

Tag<Material> tag = Bukkit.getTag(Tag.REGISTRY_ITEMS, NamespacedKey.minecraft("axes"), Material.class);

left depot
#

configureationsection

lost matrix
worldly ingot
#

In the future it will be Registry.ITEM.getTag(NamespacedKey.minecraft("axes"));

tender shard
left depot
tender shard
left depot
#

yeah code problems

lost matrix
# left depot yeah code problems

Yes im talking about code problems.
Dont use FileConfigurations on runtime. They are error prone and
can be deceiving in terms of their current state.

Player joins -> load all data of that player into an object
Player leaves -> save the data back.

For this you can use FileConfigurations. But dont randomly use them
during runtime. Accessing data by String keys in different parts of your
code is bound to cause problems eventually.

left depot
#

ahhh okay

lilac dagger
#

I cache my configs nowdays

rotund ravine
autumn cave
#

Is it possible to create an inventory with a title with a font specified / passing a TextComponent instead of a string?

remote swallow
#

it will be soon

autumn cave
#

How so? big changes coming up?

river oracle
lost leaf
#

Can any one help me

remote swallow
lost leaf
#

I idk how to give normal player just one plot

remote swallow
undone axleBOT
#

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

autumn cave
lost leaf
#

Bro

autumn cave
river oracle
tender shard
#

bro

river oracle
lost leaf
flint coyote
#

He's not wrong

river oracle
river oracle
#

handleHandle

remote swallow
#

kekw

river oracle
#

and change the title on open

autumn cave
young knoll
#

InventoryView iirc

autumn cave
#

Its not there, unless it got added very recently to Spigot (I'm on 1.20.1 jar from June)

young knoll
#

Should be in 1.20

autumn cave
young knoll
#

Iirc it’s a 1.19 addition

#

Ah okay it’s just setTitle

autumn cave
#

Oh, that's awesome

river oracle
#

that's my own method I'm referencing

#

InventoryView#setTitle doesn't support components

young knoll
#

Not until that PR

#

Md plz

autumn cave
#

Do you guys know how the lifetime of an inventory works? Can I keep a reference to an inventory that has no viewers and if so, how do I delete it?

young knoll
#

Removal all references

#

And GC will eat it

remote swallow
#

hi im gc

shadow night
#

Hi gc, I'm dad

cinder abyss
#

Hello, how can I get the xpRepairRatio of a ItemStack (the cost of rename in an anvil)

river oracle
#

isn't the cost to rename always 1 level

#

could be wrong, but iirc that is constant

cinder abyss
remote swallow
#

yeah

#

in vanilla its always 1 level

river oracle
#

okay, I thought so

#

if its not 1 level in spigot make a jira report

cinder abyss
river oracle
#

swear to god it is

#

I know I'm not crazy

remote swallow
#

are you adding a name and enchants

cinder abyss
#

it could

remote swallow
#

theres why

#

the rename is always 1 level from that

cinder abyss
#

just want to get the xpRepairRatio

cinder abyss
#

@young knoll I can check if a ItemMeta is an instanceof Repairable ?

#

Repairable doesn't extend ItemMeta so I don't really know...

young knoll
cinder abyss
#

oh it is in 1.20

#

but not in 1.17.1

remote swallow
#

it should be in prior versions

opal juniper
#

i would be surprised it it hasn’t since the dawn of time

cinder abyss
#

then how can I get the repair cost in 1.17 or below ? x)

carmine mica
#

it does not extend ItemMeta until relatively recently. another big issue with ItemMeta is all this stuff

#

just cast it to Repairable

opal juniper
#

and i am surprised

carmine mica
#

CraftMetaItem extends it

#

ALL item meta is "repairable" all item meta is "damageable" all item meta is "BlockDataMeta"

sterile token
#

Is there any more efficiente way for doing pagination for this?

cinder abyss
carmine mica
#

no

remote swallow
#

just cast it anyway

carmine mica
#

all ItemMeta is also an instance of Repairable, Damageable and BlockDataMeta

cinder abyss
#

okay

#

I'll try then

#

thanks

lilac dagger
worldly ingot
#

wut

lilac dagger
#

But if the code will look ugly afterwards i'd recommend to keep it like this

#

It'll be less work that's why

#

Less space and less computations

echo basalt
lilac dagger
#

Uhm?

#

What's wrong with my approach then?

#

I am using my approach just fine

#

Why create 3 extra objects to the gc to work

echo basalt
#

You're micro optimizing for a problem that doesn't exist

lilac dagger
#

I guess but it's a help command

#

It can have quiet a few of pages

echo basalt
#

Trading readability for those 3 objects

agile hollow
#

who can help me to understand the schedule?

#

like the wait time from an action an another

lilac dagger
slender elbow
#

the gc doesn't really mind 3 extra objects

strong parcel
#

I am having issues calling methods from a dependency.

agile hollow
strong parcel
smoky oak
#

which would be 10s * 20 ticks/second = 200 ticks

agile hollow
#

ye but i didn't find the code i have to write

strong parcel
#

What do you mean by that? Like which methods to use?

smoky oak
#

Bukkit.getScheduler().runTaskLater( block -> {block.setMaterial(Material.AIR)},200);

strong parcel
#

Video above covers what you need to know about tasks and scheduling.

alpine urchin
#

hi @lilac dagger

smoky oak
#

yea

agile hollow
#

ok thx

#

why?

lilac dagger
agile hollow
#

then how can i make a block replacing after 10 seconds

strong parcel
#

So I am trying to call this method from a dependency. https://paste.md-5.net/ofazopixuk.cs The method involves getting an object from a hashmap inside the dependency. For some reason, PlayerData playerData = PlayerData.player_data_hashmap.get(player.getUniqueId()); is null, which never happens when the dependency calls this method inside itself. Does anyone know why?

#

PlayerData playerData = PlayerData.player_data_hashmap.get(player.getUniqueId()); This is the only part to focus on anyway.

rotund ravine
#

Looks like pythonn

strong parcel
#

the snake case is a vestige of coming from python

#

Back when I was too stubborn to use camelCase

#

The method works though 😭. The problem is playerData is null when my new plugin, using this as a dependency, calls the method.