#help-development

1 messages Β· Page 786 of 1

remote swallow
#

can anyone confirm

rotund ravine
#

Can confirm

spare hazel
#

wait

pseudo hazel
#

just using a servers name for anything not on that server is just kinda weird imo

spare hazel
#

im getting actual numbers from getNumber

smoky oak
#

assuming there are two variations of the config file, the currently saved one and an updated one. How do you update the new file without losing the configuration settings from the old one? Are you required to load in the old config and iterate it or is there a simpler way?

compact haven
#

what?

#

u mean like merging the config together?

smoky oak
#

copying all current settings to the new config

#

a la

golden turret
#

how can I get the blockface of an angle? I would like that it will only return south, north, east and west only if the angle is 0, 90, 180 or 270. Any other values like 0.0001 will return south east, for example

compact haven
#

for what

smoky oak
#

new:

value_a: 10
value_b: 20

old:

value_a: 20

should merge into

value_a: 20
value_b: 20
compact haven
#

it already does that

#

unless someone manually edited hte config after u loaded it with loadConfiguration then you saved updates to the file

smoky oak
#

whats the code to do that?

compact haven
#

the code for what

smoky oak
#

just saveConfig(false) ?

#

*default

compact haven
#

saveDefaultConfig doesn't take parameters?

#

im confused. what is the problem that you're attempting to fix

compact haven
smoky oak
#

no

compact haven
#

then what are you attempting

smoky oak
#

i want to make sure that a configuration gets all new config values, without editing the old ones

compact haven
#

it already does that

rotund ravine
#

Huh?

#

Ur wiliding

compact haven
#

if you load a configuration, it takes the old ones into memory. then you write new ones. then you save the old and new from memory to a config file

smoky oak
#

this says it fails

compact haven
#

because you don't use saveDefaultConfig(), you use saveConfig()

#

saveDefaultConfig() is just for the config defaults

rotund ravine
#

I mean

#

If u add new values in config.yml

smoky oak
#

yea

rotund ravine
#

It won’t add those values magically

compact haven
#

add new values how so?

#

programmatically or through an editor?

smoky oak
#

in code

compact haven
#

then you literally just use saveConfig

#

I don't get the problem

smoky oak
#

mate

#

i want to know how to add new configuration PATHS after version changes

#

i know how to edit a value in a config

compact haven
#

then you store a version key in the config, and you write update logic that will add new paths if the verison is outdated

#

and you continue running your upgrade code version by version until the old version = the new version

#

something like this. assume you add a configurable "hearts" in version 8 but want to make it out of 20 instead of 10 in v9.

registerUpdateLogic(8, (config) => {
  config.set("hearts", 10.0);
}); // Updates from 7 -> 8

registerUpdateLogic(9, (config) => {
  double oldValue = config.getDouble("hearts");
  oldValue *= 2;

  config.set("hearts", oldValue);
}); // Updates from 8 -> 9
compact haven
#

then registerUpdateLogic will toss it into a map, you'll have a constant for the current version, and you'll iterate each version between the key in the config and execute the consumer (if it exists) in the map to upgrade

wet breach
#

you can add paths however you want, but if the concern is old paths and want those old paths gone, you would just set them to null and save the file

#

and then if its missing, you would utilize defaults with the get method

#

this way, you don't just get NPE's πŸ˜›

#

and then on the next save that new thing that was missing is now there πŸ˜„

compact haven
#

no it wouldn't be

wet breach
#

using defaults? yes it would

compact haven
#

he'd need to have deserialization logic for it to appear using defaults in get

wet breach
#

no...

compact haven
#

getInt("hearts", 20) will not add "hearts" = 20 into my yaml file after save
saveConfig()

wet breach
#

config.getString("Default", "Path of string you wanted");
config.saveConfig();
#

if the path was missing, the default is used and on next save will save it to that path

smoky oak
#

i see

#

on a different topic...

#

how do i do this again

wet breach
#

ah the singletron

smoky oak
#

i mean

#

i really shouldnt have 4 config handlers with different configs floating around

compact haven
#

yeah, that's why you use DI, but whatever

wet breach
#

I am curious in where you got singletron from XD

smoky oak
#

?di

undone axleBOT
wet breach
#

or maybe lazy loading?

smoky oak
#

like i want one global shared instance of this class, ideally obtained by calling the constructor

wet breach
#

ah yeah singleton

smoky oak
#

i know how to do it with static and getters but im not sure if its possible with a constructor

undone yarrow
#

[19:22:49 INFO]: JustinS_2006 issued server command: /sc add ASH 5 sand,grass(5),dirt(200)
[19:22:49 ERROR]: null
org.bukkit.command.CommandException: Unhandled exception executing command 'sc' in plugin ScrapCollection v1.0
....
at java.lang.Thread.run(Thread.java:833) [?:?]
Caused by: java.lang.NumberFormatException: Cannot parse null string
...
at me.JustinS_2006.particles.AddParticleCommand.parseItem(AddParticleCommand.java:117) ~[?:?]
at me.JustinS_2006.particles.AddParticleCommand.onCommand(AddParticleCommand.java:69) ~[?:?]
...

  private ItemStack parseItem(String input) {
        Matcher matcher = PATTERN.matcher(input);

        if (!matcher.matches()) return null;
        int groupCount = matcher.groupCount();
        if (groupCount == 0) return null;

        Material material = Material.matchMaterial(matcher.group(1)); 
        int model = (groupCount == 1 ? 0 : Integer.parseInt(matcher.group(2)));    // The line that causes the error?
        if (material != null) {
            ItemStack item = new ItemStack(material);
            ItemMeta meta = item.getItemMeta();
            if (meta == null) return item;
            meta.setCustomModelData(model);
            item.setItemMeta(meta);
            return item;
            }
        return null;
    }``` Why the heck does that line give an error?

When I change the command to /sc add ASH 5 sand__(3)__,grass(5),dirt(200) then it does work. So it has to do with brackets missing at the first part
compact haven
wet breach
#

now the thing that is missing is that class doesn't have a constructor

#

however typically people will just make a private empty one to just ensure it isn't possible to use it

compact haven
#

frost link me to the spigot src on gitlab please

#

i cant find it anywhere on google

smoky oak
#

i want that one too

remote swallow
#

?stash

undone axleBOT
wet breach
#

?stash

undone axleBOT
wet breach
#

-.-

smoky oak
#

thats not the code thats a pile of patches lol

wet breach
#

?bt

undone axleBOT
smoky oak
glad prawn
smoky oak
#

so i cant

#

gotcha

compact haven
#

yeah I checked frost, unless I'm blind then this definitely doesn't save the default:

getConfig().getInt("hearts", 20)
saveConfig()

getInt:

    @Override
    public int getInt(@NotNull String path, int def) {
        Object val = get(path, def);
        return (val instanceof Number) ? toInt(val) : def;
    }

get:

        String key = path.substring(i2);
        if (section == this) {
            SectionPathData result = map.get(key);
            return (result == null) ? def : result.getData();
        }
        return section.get(key, def);

its just a ternary operator

wet breach
#

yeah that is called lazy loading singleton, so how you do that is basically just add in the private constructor of the class to invoke the static method

river oracle
smoky oak
#

bleh cant we just have an @singletron flag lol

compact haven
#

first its not a singletron and second its bad design, that's why

rotund ravine
#

Lombok πŸ‘€

#

Just use DI and pass it properly πŸ’ͺ🏻

compact haven
#

^ storng man

smoky oak
#

the entire point is not writing a getter

#

& i know how to do DI

river oracle
compact haven
#

DI is great Β―_(ツ)_/Β―

#

at least it's proper OOP rather than some hacky nonsense

river oracle
smoky oak
#

hacky nonsense is the java foundation im not sure what your problem is :kekw:

river oracle
wet breach
#

class someClass {

private static someClass instance;

private someClass() {
   instance = this;
}

public static someClass getInstance() {
    if(instance == null) {
        instance = new someClass();
    }
    return instance;
}
}
river oracle
#

That's redundant

smoky oak
#

im aware frost
so its not possible without a getter?

compact haven
compact haven
wet breach
#

the getter is there for convience. You could just remove the getter

compact haven
#

java's constructor is a method with a void return under the hood, you can't change that

#

you can't be like MyClass().setThis(20)
and expect MyClass().getThis() == 20

smoky oak
#

wait

#

if its like that

#

wouldnt reflection work

compact haven
compact haven
river oracle
compact haven
#

^ ong

smoky oak
#

imo uppercase doesnt belong in code

compact haven
#

?-?

wet breach
#

doesn't really matter much except with constants

compact haven
#

no it literally matters

wet breach
#

otherwise preference as long as your consistent lmao

compact haven
#

you are not going to tell me you are using a class named like a field or method

#

the entire fucking java sdk is written with UppercaseCamel, and you want to make a class lowercaseCamel?

wet breach
river oracle
shadow night
#

What

wet breach
#

so while you may have the preference to follow the conventions, it is not enforced by Java

compact haven
#

ugh I'm not. I don't even know why I'm still in this discord

#

I give perfectly good instructions and am being overridden by incorrect ones

wet breach
#

well opinions are not facts

shadow night
#

I wanna make money

smoky oak
#

HA

wet breach
#

I really don't care how people decide to code their projects as long as I am not the one working on it πŸ™‚

smoky oak
#

fat chance

river oracle
wet breach
#

if they want lower case then so be it, its theirs not yours

undone yarrow
#

What decides whether an item has a displayname or not?

river oracle
compact haven
undone yarrow
compact haven
river oracle
undone yarrow
#

I mean, all standard items such as white_dye will have the display name White Dye right?

undone yarrow
wet breach
#

but not sure what that has to do with conventions

compact haven
#

Never said it did

wet breach
#

well the last thing being discussed was conventions so I assumed you were still referring to that

compact haven
#

I was frustrated by the 3 instances: upgrading config values on a new version, 'singletron', and the code style

#

anyways, no worries

wet breach
#

and there is nothing wrong with using singleton if its needed

compact haven
#

I'm not going to spend my afternoon arguing here

smoky oak
#

whats 1 mod 1?

#

1 or 0?

river oracle
compact haven
#

0

smoky oak
#

k

river oracle
#

1 is divisible by 1

#

With no remainder

wet breach
#

modulo finds that remainder when the numbers are divided πŸ™‚

smoky oak
#

my brains fired sue me lol

shadow night
#

What is the % thingy

wet breach
#

so, 2 mod 5 would be 1 as there is a remainder of 1 left

wet breach
#

the thing we are talking about o.O

shadow night
#

I've used it before, but I don't really know shit about that... shit

wet breach
#

well its nicely explained above lmao

#

its for when you need to know how many remains after a division but don't want like the decimal

shadow night
#

Oh

smoky oak
#

can i just say how annoying it is that auto complete hits those single letter classes instead of the class youre in right now

undone yarrow
wet breach
#

lol

undone yarrow
#

so 3%11 would be 2?

#

or am I completely wrong

glad prawn
#

11%3 = 2

undone yarrow
#

ah you reverse it

shadow night
#

I hate when I'm writing code, I need to tab complete something, but there comes copilot with its useless suggestion

wet breach
#

lmao

undone yarrow
#

Every time I'm writing something, I keep writing but I see a suggestion so I click tab, but then Im too late because the suggestion already changed and now I have to delete everything and wait for the previous suggestion to load

shadow night
#

You can ctrl + z it

#

But I wish I had keybinds to disable copilot

undone yarrow
#

true but then the previous suggestion doesnt show

#

then I need to delete the previous letter, and continue writing and then it comes with a suggestion

shadow night
undone yarrow
# river oracle Not a custom one

It says that sand (with a custom model data) does not have a displayname. How is that right?? anyways, how do I make it display its name then?

undone yarrow
wet breach
#

if (number & 1)

shadow night
whole lintel
#

frostalf is objectively right

wet breach
shadow night
#

Js people make whole packages for that

whole lintel
#

tbh there should be a role for reliable people

#

to take advice from

undone yarrow
wet breach
river oracle
wet breach
#

doesn't JS have bitshifting?

shadow night
river oracle
compact haven
#

I literally checked the source code

whole lintel
#

naming conventions arent forced

compact haven
#

I was talking about 3 things. One of them was including something he was objectively incorrect about

whole lintel
#

it just makes you look stupid if you don't use them

compact haven
#

read the whole conversation please, before bringing me back to something I tried to like 20 minutes ago.

shadow night
#

Naming conventions are recommended to use for more readable code, but not required

compact haven
#

Naming conventions aren't required in most programming languages

wet breach
#
public boolean isOdd(int number) {
    return (number & 1);
}
compact haven
#

doesn't mean that the recommendation should be to disregard them

wet breach
#

of detecting if its a number?

shadow night
#

Yes

whole lintel
#

u should always use DI?

#

or smth

#

was that ur point

wet breach
undone yarrow
#

πŸ˜•

compact haven
#

My point was that I gave solid advice 3 times and each time I was ignored for frost's generally bad advice. The reason I got mad is that the person who needed support and I was told something incorrect about saving defaults after I gave good advice on how to upgrade configurations on version changes, which was promptly ignored completely.

#

Completely ignored for incorrect advice.

wet breach
#

is that good @shadow night ?

compact haven
#

whatever, I'm not responding again because it doesn't matter. you literally can't show up 20 minutes late to a conversation and defend someone without reading it all, because this is the third time I've restated why I was mad.

inner mulch
#

what is bro talking about?

wet breach
compact haven
#

exactly the problem. That's why you don't revive an ancient argument from 30 minutes ago.

compact haven
river oracle
#

Sorry

undone yarrow
#

No worries, thanks for the help anyway πŸ™‚

compact haven
#

I'm just frustrated that I waste a tiny part of my afternoon giving good advice when it's overridden by your (conventionally or objectively) incorrect advice. I didn't receive a single acknowledgement towards the advice I gave Monterius even though it was good advice

wet breach
#

or how it works anyways

compact haven
#

that's alright frost, I don't need an apology from you or him, but I appreciate it

wet breach
#

I don't really care why someone wants to know how to make a singleton or if they need it. I am not here to hold their hands and walk them through every step lol

#

they want to use singletons everywhere so be it, its not my program πŸ˜›

wet breach
compact haven
#

unless it did from Itzdlg to Dominick

#

it could also be that I'm no longer pink, I had to cancel nitro for a bit to wait for pay

wet breach
#

I could have sworn at some point you were itzdlg XD

compact haven
#

yeah that makes sense, probs because I was verified and the bot forced it to Itzdlg

#

but ig when discord changed their username system it became Dominick at some point?

#

OH

#

yeah you're right, I changed my display name to Dominick when I no longer had Itzdlg#7444

wet breach
#

ah

undone yarrow
#

why is there still an empty description if I didnt set its lore?

                        if (!customItem.get("description").toString().isEmpty())
                            itemMeta.setLore(List.of(ChatColor.DARK_PURPLE + customItem.get("description").getAsString()));```
#

"description": ""

#

or "description": " "

#

they still give the lore an empty space as in the pic

#

man wtf, I even changed to this and it still gives me that weird blank space

                        if (!customItem.get("description").toString().isEmpty())
                            itemMeta.setLore(List.of(ChatColor.DARK_PURPLE + customItem.get("description").getAsString()));
                        else
                            itemMeta.setLore(null);```
chrome beacon
#

Use getAsString instead of toString

#

also might want a variable

undone yarrow
undone yarrow
chrome beacon
#

duplicate code

undone yarrow
#

thanks!

valid burrow
#

how would one go on about spawning custom animals like not the spawning itself but checking for propper spawning regions, entity caps etc

shadow night
wet breach
undone yarrow
#

Can anyone explain how paginator works?
I need to wrap the lore text but Im not sure how it works and the docs arent of much use
I have this but it says Operator '+' cannot be applied to 'org.bukkit.ChatColor', 'org.bukkit.util.ChatPaginator.ChatPage', which makes sense, but if I change the paginated part to string it will just become unpaginated again right?
itemMeta.setLore(List.of(ChatColor.DARK_PURPLE + paginate(customItem.get("description").getAsString(), 1, 10, 10)));

young knoll
#

Use ChatPaginator.wordWrap

undone yarrow
rotund ravine
#

No?

#

setLore requires a list of strings

undone yarrow
#

huh

#

heh

undone yarrow
rotund ravine
#

That’s an array

#

Arrays.asList

undone yarrow
#

oh... right

undone yarrow
#

Even without the brackets it doesnt work

rotund ravine
#

It’s a static method

#

From the class Arrays

#

It takes an array as a parameter

glad prawn
#

..Arrays.asList(ChatPaginator.wordWrap(...))..

undone yarrow
#

Ah... that uhh... makes sense

#

thanks!

undone yarrow
#

Sorry if Im asking stupid questions right now

#

It's probably because I'm stupid

rotund ravine
#

You’d need to add it to each line

undone yarrow
#

yeah I think I got it

#

I love each and every one of you. I hope someone gets you cookies from time to time

storm crystal
#

to make a custom chat format system I'd have to cancel message on send, save it and reformat chat on my own way?

#

or how am I supposed to do it?

remote swallow
#

async chat even and set format

storm crystal
#

whats asyncing

#

@echo basalt I got a question about this

#

is it just armorstand effects or also utilty class

smoky oak
#

so why does it want paper and why is it not on maven

rotund ravine
#

One of ur dependencies probably

#

And it is on maven

#

Just not one of ur repos

smoky oak
#

ah thatd do it

#

but this is an api of a plugin hosted on spigotmc

#

why does it hard depend on paper?

rotund ravine
#

It does not

tall dragon
#

is that your only dependency?

rotund ravine
#

Oh

rotund ravine
smoky oak
#

which only ever depends on spigot

#

different topic, which of yall had the 'skin to head' code on their website?

tall dragon
#

probably mfnalex

#

search here ig

#

;d

smoky oak
#

yea he does

#

thx

storm crystal
#

why is ArmorstandEffectData in method name?

#

and why is there lambda?

smoky oak
#

oh this is irritating

#

all the stuff used in that code doesnt provide automatic imports

storm crystal
#

Yeah just by reading all this code Ive got no idea how to make armor stand management class

smoky oak
#

what fresh hell is this

#

oh theres a parser nvmind

remote swallow
#

UUID.fromString

storm crystal
#

how do I add stuff to this collection

robust helm
#

using something like Map.getOrPut and default collection usage

#

or more like getOrPut(Map map, alternativeValue)

storm crystal
#

what

smoky oak
#
ERROR: transport error 202: bind failed: Address already in use
ERROR: JDWP Transport dt_socket failed to initialize, TRANSPORT_INIT(510)
JDWP exit error AGENT_ERROR_TRANSPORT_INIT(197): No transports initialized [s\open\src\jdk.jdwp.agent\share\native\libjdwp\debugInit.c:734]

so apparantly you can only open one socket with the same port

robust helm
# storm crystal what

basically just check if the the map contains player, if not put him on the map with an empty collection; Then get the players collection from the map and add the armorstand to it

#

if(!playerStands.containsKey(player.getUniqueId()) {playerStands.put(player.getUniwueId(), new AreayList<>());
}
playerStands.get(player.getUniqueId()).add(armorStand);

dry hazel
#

computeIfAbsent exists

dry hazel
#

pick an implementation of it

#

ArrayList is probably what you want

glad prawn
#

Collections.emptyList() will be fine

storm crystal
#

I dont get it

#

why is it here

dry hazel
glad prawn
#

he hasn't changed anything either

robust helm
storm crystal
#

its someone else's

#

I literally sent it a few lines ago

robust helm
storm crystal
#

why

robust helm
#

because collection is more generic

#

i dont rlly know tbh

dry hazel
#

it should work just fine

robust helm
#

but u should use an implementation of Collection

#

probably an ArrayList

storm crystal
glad prawn
#

List.of Arrays.asList

robust helm
#

castings fine too tho

dry hazel
#

that's literally irrelevant

#

your issue is that you want to get or insert a collection first and then append to the collection

#

playerStands.computeIfAbsent(..., (k) -> new ArrayList<>()).add(...)

storm crystal
#

neither works

robust helm
#

u need an instance of an implementation of list as value

dry hazel
#

?learnjava put shortly

undone axleBOT
glad prawn
storm crystal
#

why ArrayList can be instancized

#

whats the difference in ArrayList and List

dry hazel
#

List is the abstract version

#

and ArrayList is the implementation

storm crystal
#

what is k here

dry hazel
#

the map key, irrelevant for what you want to do

storm crystal
#

but itll keep creating new arrays

#

while I only want 1 per player

dry hazel
#

it won't

storm crystal
#

why?

glad prawn
#

i think he also doesn't know how to use Map

robust helm
#

whats ur current code?

storm crystal
dry hazel
#

that lambda would get run only to populate the map in case there's no value for that key

robust helm
#

u rlly try to keep it complicated lol

#

many complicated words of which he probably hasnt heard a single one

dry hazel
#

if key not in map, create new list and put the key and list in map; if key in map, get existing list; return list

vestal moat
#
Caused by: org.eclipse.aether.resolution.ArtifactResolutionException: Could not transfer artifact com.microsoft.onnxruntime:onnxruntime:pom:1.15.1 from/to central (https://repo.maven.apache.org/maven2): Checksum validation failed, no checksums available```
??
undone yarrow
#

I'm trying to read a file in my folder, but Im not sure what the directory is supposed to be. Atm I have this but it says it can't find the directory or file
try (FileReader reader = new FileReader("/home/container/plugins/CUSTOMITEM_DATA.json")) {...
It says the directory it just exactly that, so I'm not sure what's going on here. Should I just do plugins/?

wooden hearth
#

Hey I've made a mute system where it gives a duration then a reason do you think this way to store the reason in a string is a valid way? ```java
private String reason(String[] args) {
StringBuilder reason = new StringBuilder();

    for(int i = 3; i < args.length; i++) {
        reason.append(args[i]).append(" ");
    }

    return reason.toString();
}```
golden turret
#

I am creating a custom entity that walks on the rails. It works fine but when it is too fast it leaves the rails. The solution I thought for it is to get all rails in the entity's hitbox and get the closest to the center point. My question is: how can I get all blocks in the hitbox?

storm crystal
#

fuck this Im just totally confused beyond

#

how the hell do I make a class that would manage armorstands

chrome beacon
undone yarrow
#

This works on my self hosted server

chrome beacon
#

Why not?

undone yarrow
#

just trying to figure out what directory I should use for this

#

Why fix something that's not broken

chrome beacon
#

Well it's broken though?

#

Didn't you just say it doesn't work and that you needed help?

storm crystal
#

do I need to make each instance of such class for each thing that needs it

#

or can I go away with only one instance

lost matrix
#

Manager classes only have one single instance created. Usually when the program starts.

storm crystal
#

like what if its dependent on location and player's uuid

#

how do I make it so that it'd work with those

chrome beacon
#

The Manager shouldn't ever be dependant on that

lost matrix
#

I dont understand why they would not work?

storm crystal
chrome beacon
#

Yeah you can have a single manager

#

not one per location and uuid

storm crystal
#

so like do I just make constructor that would take Location and Player and use those?

chrome beacon
#

No?

#

You should only have one manager

storm crystal
#

so how do I pass them

chrome beacon
#

You can pass your armor stands to the manager via a method call

storm crystal
#

great but that Illusion guy didnt have it and none of his methods depended on it

brisk jetty
#

How do i play the totem of undying animation?
Without the sound or the particles, just the totem

Ive searched online and cant seem to figure it out

brisk jetty
#

it does

#

i tried that already

chrome beacon
#

oh well packet time ig

trim lake
#

Why output is looking like that?

this.progress += 0.001;
System.out.println("progress: " + getProgress());
kind hatch
#

I wonder if that packet even has options for only the animation.

opal carbon
#

does this idea even exist

opal carbon
#

just round it off at a few decimals

#

i know you can do it with .format but i suck at .format lol

trim lake
kind hatch
#

DecimalFormat#format(β€œ###.00”)

opal carbon
#

i was more thinking string format

trim lake
#

what about this?

private double round(double number, int decimals) {
        int multiplier = (int) Math.pow(10, decimals);
        number *= multiplier;
        number = Math.round(number);
        number /= multiplier;
        return number;
    }
kind hatch
#

Ah, well I also suck at that. Lmao

trim lake
opal carbon
#

oh %.#f where # is number of digits

kind hatch
#

?mappings

undone axleBOT
opal carbon
#

oh thats what it was %(numberofcharacters).(numberofdecimalaccuracy)f

trim lake
#

this should be fine than or I can just round it with method above (but probably not nesasery)

System.out.println("progress: " + new DecimalFormat("0.000").format(this.progress));
#

yup its working

#

ty guys

storm crystal
#

so when I want to make method to spawn armorstand

#

and invoke it with player and location

#

and make it return armorstand id

vestal moat
#

is it possible to exclude a library in plugin.yml libraries section?

storm crystal
#

do I just add it to Map<PlayerUUID ArrayList<ArmorStandUUID>>?

devout tartan
storm crystal
#

so that I could loop through it and find all armorstands in case I need to delete them?

vestal moat
storm crystal
#

wait do I need to put PDCs on armorstands

devout tartan
storm crystal
#

or can I use armorstand ID?

devout tartan
#

or is this a plugin you don't own?

vestal moat
#

this is a sub dependency

devout tartan
#

huh, cool library... didn't know something like this existed

vestal moat
#

??

wooden hearth
#

Hey is there any tools to check on plugin performance to see if my code needs improving more?

old cloud
#

Is there any way to communicate Proxy <=> Subserver all the time except another tcp connection? I feel like another tcp connection in a plugin would just make the setup super annoying.

wooden hearth
#

Okay thank you

chrome beacon
#

So connection information goes through messaging channel

#

Makes it less annoying to setup ig

storm crystal
#

is there a way to force F5 on a player?

chrome beacon
#

No

old cloud
chrome beacon
#

Yeah

old cloud
#

ok too bad

#

Reason I think tcp con is gonna be annoying is because firewall

#

Like most people already complain when the setup is more complicated than just putting the plugin into the plugins directory

#

And then you get 1 star reviews because some ppl can't read

chrome beacon
#

Nothing much you can do about that

#

You'll get 1 star reviews regardless of what you do

old cloud
#

yea i see

#

feels great when your work is being appreciated πŸ˜‚

dire maple
#

Hi, sort of new to the whole Bungeecord messaging thing... I'm working on a global notification system for staff. It works as intended, so that's good.. only staff get them, etc.. but it seems that notifications that are not StaffChat get duplicated by how many players are on the proxy.

If there's 3 players on, and somebody gets banned... the notification gets sent 3 times. If somebody flags the filter and there's 6 players on, the notifications is sent 6 times...

This does not happen with staffchat, why? I'm doing nothing different

#

The order of events:

  • Command or action > spigotmc to bungeecord: _staffNotifications > bungeecord plugin sends message to right people
old cloud
dire maple
old cloud
#

?paste

undone axleBOT
old cloud
#

use this pls

dire maple
#

Yep

#

idk what happened with the spacing

#

And ignore the scribble, I ripped it from google

old cloud
#

what does globalStaffAlert do

dire maple
#

It sends the message out to all staff, I'll send that code as well sorry

#
public static void globalStaffAlert(String message)
    {
        for(ProxiedPlayer players : ProxyServer.getInstance().getPlayers())
        {
            if(ProxyServer.getInstance().getPlayer(players.getUniqueId()).hasPermission("global.staffalerts"))
            {
                if(RECEIVING_STAFF_ALERTS.getOrDefault(players.getUniqueId(), true))
                {
                    ProxyServer.getInstance().getPlayer(players.getUniqueId()).sendMessage(C.text("&b[STAFF] &f" + message));
                }
            }
        }
    }
#

I would use paste but it's all such small code

#

RECEIVING_STAFF_ALERTS is a map of uuids with booleans.... hopefully self explanatory

old cloud
#

Maybe your plugin message gets sent by all players? That would explain the duplicates depending on player count

dire maple
#

That's exactly what I was thinking, any idea what I could be doing wrong

old cloud
#

Not without more code i think#

robust helm
dire maple
#

😦

#

Ok hold on sorry

#

Sending code

robust helm
#

why getOrDefault with default value true?

#

does this mean u put every player on join on this map, or is that the problem?

old cloud
dire maple
#

No, they need the staff perm

dire maple
#

My dear friend recommended using that method with N/A, I thought it was fishy

#

If you have a better way of doing that, please let me know

#

So when a person gets banned, the plugin on the server will run BungeeChannel#sendStaffNotification(notification)

old cloud
#

And how do you determine when a player gets banned?

#

That part is also missing

dire maple
old cloud
#

can u show pls

dire maple
#

I'm not sure it's too important to show a method being used... I've explained everything

old cloud
#

so you dont need help thats ok

dire maple
#

It just feels like a lot of code being sent, with minimal help received

#

I've sent everything PluginMessaging related

#

There is no direct reference to PluginMessaging in the ban command, only the method BungeeChannel#sendStaffNotification(notification), which you already have

old cloud
#

Yea but its important how you call it

dire maple
#

It's called once if the ban is present

old cloud
#

r u sure its called once

dire maple
#

I can't release the ban code because I was paid to develop that part, the rest idm because that is public code found anywhere with enough scowering

dire maple
old cloud
#

what does your onPluginMessageReceived look like

#

right you sent that

dire maple
#

On the plugin? or in the Bungeecord plugin?

old cloud
#

Cant really help you if I cant look through the code. Its not always some snippets. Sometimes the bug is in places where you would never expect it. I can only recommend you to debug it step by step to see where the duplication happens

dire maple
#

It can't be an instance issue

storm crystal
#

should I use armorstand PDC or ID to cache them?

dire maple
#

I've made sure to use the staff notifications as little as possible

river oracle
#

that would be counter intuitive

storm crystal
#

why

river oracle
old cloud
river oracle
#

but that wouldn't be caching

#

that's you just associating data with an item permanently

young knoll
#

Technically pdc is cached for you

dire maple
#

I just can't find any similar issues which is so weird

storm crystal
#

is there a way to get player's direction as vector?

dire maple
vocal cloud
#

Check the docs

dire maple
#

True

old cloud
#

I will as well because im interested now

dire maple
#

Just odd that it doesn't have a problem with StaffChat

#

Considering it uses the same system, but is just connected to the proxy directly

storm crystal
#

also is kotlin any good for plugins?

dire maple
#

I could assign each notification a specific player if I needed to, it would just be annoying to retrofit

#

I can't find anything on the docs????

old cloud
#

How do you even send a plugin message without a player?

dire maple
#

Just assign it to user N/A

old cloud
#

Don't you have to call it through the player interface

dire maple
#

Nope

#

I call it through the server

old cloud
#

Ah then thats the issue probably

dire maple
#

Ah

#

Let me write some modifications

molten hearth
#

alr so im trying to change a noteblock's intrument from changing when placed above another noteblock, is that a job for BlockPhysicsEvent or what-

tall dragon
#

you'd probably need to cancel interactevent and place the block programmatically

old cloud
# dire maple Ah

You could use the player who was banned to send the plugin message (if not disconnected already) or chose a random player i think

storm crystal
#

How do I remove armor stand with it's id?

dire maple
wet breach
#

kill it

#

with fire

dire maple
#

So... it's not a random player, just related to the notification in one way or another

storm crystal
#

?

wet breach
#

just messing with you, there is a method to remove/kill entities

#

and you just feed it the UUID

#

as long as the chunk where the entity is at is loaded, it should remove said entity from existence πŸ™‚

old cloud
dire maple
#

I hated to be so rude earlier sorry, but it just felt redundant sending code for something that isn't really related

storm crystal
#

what would be a code to kill entity knowing its UUID?

old cloud
old cloud
dire maple
#

If the fix I made works, I won't even bother doing anything more

old cloud
#

yea, you can try it. But i feel like that wont be it

dire maple
#

Β―_(ツ)_/Β―

#

The notificationOwner is now the primary method for the .sendPluginMessage

kind hatch
dire maple
#

Yeah it seems like that worked @old cloud

#

Stupid BungeeCord ruining everything LOL

young knoll
old cloud
dire maple
#

Using the Player notificationOwner to send the plugin message instead of the actual getServer() method

#

Player#sendPluginMessage.. > Server#sendPluginMessage..

storm crystal
#

would I need anything else for armorstand management for animations?

#

I feel like this might be enough

old cloud
dire maple
old cloud
#

Because the subserver sends it multiple times

dire maple
#

Because it would still use every player on proxy

old cloud
#

I will look into source code now to see what happens there

dire maple
#

Yeah

#

Ok leaving spigot discord now thx so much

quaint mantle
#

Getting skull with texture from link

zenith gate
#

How do I create a library and can be imported with maven?

young knoll
#

Make a project and publish it with maven

#

Either to maven local or some remote repo

quaint mantle
#

just create plugin with accesible API class, publish it to github then use jitpack.io

young knoll
#

Doesn’t have to be a plugin but yeah

zenith gate
#

im so confused i dont understand. how would i publish it to maven.

quaint mantle
#

just put it on github and then put your github repo link into jitpack.io. It will build your artifact and then serve it to anyone who imports it with maven

zenith gate
#

alrighty.

#

so i can just create a normal java project and just pass the plugin interface?

quaint mantle
#

I mean, yeah

#

a lot of libraries do that

zenith gate
#

well someone else also said you can just create a plugin and do it so i got confused

quaint mantle
#

you can do either

storm crystal
#

does this code look okay?

old cloud
zenith gate
#

if i import a library within my library will the user also have to import it, or will it just import from mine?

river oracle
zenith gate
#

ima do that, cause this uses Lamp.

torn shuttle
#

I'm having the hardest time coming up with good class names

storm crystal
#

any ideas on why i am getting null exception?

molten hearth
#

if i fire a custom BlockPlaceEvent will it actually set the block?

#

i think it should

#

sadge

old cloud
#

at least it is null somehow

late sonnet
storm crystal
#

why?

#

it shouldnt throw null in the first place

#

it wont solve shit

#

it should spawn an armorstand, write it's UUID into the arraylist and then do it again 12 times

old cloud
#

What does getEntity() do? @storm crystal

storm crystal
old cloud
#

There is the null return

#

so somehow doesnt find it

late sonnet
storm crystal
#

it did 3 times

#

then it shuts down cuz armorStand is apparently null

old cloud
#

maybe armor stand got destroyed/removed or something

storm crystal
#

it

#

didnt

#

get

#

destroyed

#

by

#

anything

#

why would it

old cloud
#

bro

#

the only way that thing returns null is by not finding it through the uuid

#

so you somehow store shit that doesnt exist

storm crystal
#

but why does it fucking stop at 3

#

exactly 3

#

why

old cloud
#

idk

storm crystal
#

for some fucking reason

#

it doesnt spawn more armorstands

#

only 1

zenith gate
#

why is intellij saying 'for' statement has empty body about this:

for (int i = 0; i < LEVEL; i++); {
                addExperience(player, Experience_Until_Level_Up);
            }
carmine mica
#

the semi colo after the closing paren

zenith gate
#

ohhhh that makes sense....

#

i've been at this for way to long lmao

#

it's still there...

worldly ingot
#

Refresh caches or something then

storm crystal
#

Ive been deleting only 1 armorstand from arraylist

#

xdxd

#

I dont get it

#

this method spawns me only 1 armorstand

#

despite me looping it

#

if my map looks like that

#

do I access ArrayList<UUID> like that?

pseudo hazel
#

yes

storm crystal
#

then why the fuck does it produce null

#

I dont get it

pseudo hazel
#

because the uuid isnt in the map?

storm crystal
#

it literally is

#

even this debug code simply doesnt work

worldly ingot
#

So it's very likely you're trying to get an armour stand that exists but isn't loaded

storm crystal
#

but it spawns only 1 armor stand

#

well maybe 2 cuz sometimes it deletes 2 entities

#

but I can only see 1

worldly ingot
#

That's not really relevant. It's stopping spawning entities because it's running into an exception

storm crystal
worldly ingot
#

Your getEntity(UUID) method returns null and you're invoking a method on the result of it

storm crystal
#

it doesntt

#

I checked it

#

like a while ago

worldly ingot
#

Well, it does. That exception states very clearly that it does :p

#

Stacktraces don't lie

storm crystal
#

great it works twice

#

and on the 3rd run

#

it bugs

worldly ingot
#

Like I said,

World#getEntities() only returns loaded entities
So it's very likely you're trying to get an armour stand that exists but isn't loaded

storm crystal
#

but its literally copied from another code that worked

worldly ingot
#

Okay, the other code that works probably works under different circumstances where all the entities are loaded

storm crystal
#

but why wouldnt this work

worldly ingot
#

But the only situation in which your getEntity() method can return null (and it is returning null - all exceptions you've sent stem from this method returning null) is if it cannot find the entity in the world which means either it doesn't exist or it isn't loaded

#

So it's one of those two things

#

(also an unnecessary loop by the way because World#getEntity(UUID) does exist :p)

storm crystal
#

still doesnt work

worldly ingot
#

Well no it has the same caveat of requiring the entity to be loaded

#

Just more concise is all

storm crystal
#

but what the hell am I supposed to do

worldly ingot
#

Not sure. I don't really have a whole lot of context as to what you're trying to accomplish. But if you're going to be updating armour stands in quick succession, maybe it's a good idea to keep references to the ArmorStand objects themselves. Going from Entity -> UUID -> Entity doesn't make a whole lot of sense anyway

storm crystal
#

it generates exception when this code is being run:

#

and its scheduled

#

2 seconds later

#

no way armorstands cant be loaded by this time

#

moreover

#

this code

#

which is ran immediately

#

just doesnt spawn all armorstands

#

only one

#

still does same shit

#

even if I work on armorstands

#

100% there is something wrong with this shit

#

it spawns armor stand only once

river oracle
#

Getting a TileEntity isn't a huge load right?

#
            final CraftWorld world = (CraftWorld) location.getWorld();
            final TileEntity tile = world.getHandle().getBlockEntity(position);
            if (tile instanceof TileEntityContainer tileContainer) {
                container = tileContainer.createMenu(syncId, inventory, inventory.player);
``` e.g. something like this wouldn't be a massive burden
storm crystal
#

why is it not spawning armorstand 4 times...?

#

I cant narrow it down more

river oracle
storm crystal
#

no

#

only 1 armor stand

river oracle
#

if a players location x is idk lets say 5 and your loop is on iteration 2
double x = 5 +(2*5) = 15. And this gets worse as it goes what if your player is at idk lets say then
double x = 150 + (2*150) = 450

storm crystal
#

😭 😭 😭 😭

#

I fucking

#

misinterpretated my armorstand spawn formula

#

turned out that it was the only thing that was faulty

#

how can I set rotation of armorstand?

#

as in what direction its facing

#

anyone got tutorial / guide for using interact entities?

worldly ingot
storm crystal
#

that's how my Bone ability structure looks like, is that optimal way?

#

I split it into listener and utility

zenith gate
#

how can i hide methods to users using my library? because there is stuff that like they would never use, and it would be a lot nicer if they wouldn't show up in the tab list

carmine mica
#

only expose an interface, and implement that interface

river oracle
naive loom
#

Is it possible to see who dropped an item from the PlayerDropItemEvent/EntityDropItemEvent?

halcyon hemlock
#

I got code for them haha

naive loom
#

there isn't but you could just detect when a player drops a item and when another picks it up u can use a map or smth to get it no?

#

that would be the best solution if there isn't a uuid or way to get who dropped a item from the item instance

river oracle
#

PlayerDropItemEvent extends PlayerEvent

#

which provides a getPlayer method

#

likewise you can track who dropped an item on pickup by applying PDC to an item which has the player UUID of who dropped it

naive loom
#

@river oracle @halcyon hemlock ^

river oracle
#

?pdc

naive loom
naive loom
river oracle
#

just make sure you format the NBT so you can retrieve it in later versions with PDC

brisk jetty
#

Here to complain:

currently my IDE is complaining for not using Kyori's Adventure Textcomponenet because everything else is depracated
and my Server is complaining at me because Kyoris adventure Text Componenet doesnt exist

#

ughhhhhhh

river oracle
#

this sounds like a paper problem

brisk jetty
#

using spigot

remote swallow
#

You are using paper api on a spigot server

brisk jetty
#

WIAT Im NOT

#

for some reason my pom has paper api in it

#

omg

#

ive been struggling for like 30 minutes

#

ughhh

#

Okay thank you yall

#

now i just feel dumb lmao

pseudo pine
#

Hi, I'm new to java and I'm trying to put a slow falling arrow of 30 seconds into my gui, any idea how I would do this. I already have working code but it sets the duration to 11 seconds as it does the default arrow. I have done addCustomEffect but that just adds another effect and then theres 2 of them.

                ItemStack slowFallingArrow = new ItemStack(Material.TIPPED_ARROW, 64);
                PotionMeta arrowMeta = (PotionMeta) slowFallingArrow.getItemMeta();
                arrowMeta.setBasePotionData(new PotionData(PotionType.SLOW_FALLING));
                slowFallingArrow.setItemMeta(arrowMeta);
                inv.setItem(37, getItem(slowFallingArrow, arrowMeta.getDisplayName()));```
brisk jetty
#

this is differennttt
I thought i was using spigot api

I wasnt.

glad prawn
#

u dont need to explain lol

brisk jetty
#

i knoww

#

i just feel dum

#

cause i am a lil bit))

#

im content with that

glad prawn
brisk jetty
#

somebody replied to me so i replied back

#

sorry

quaint mantle
#

?learnjava

undone axleBOT
upper hazel
#

can multiple modules in a plugin project run simultaneously?

#

I mean which plugin has the highest priority in the project out of many

#

I forgot the name of the informative site with articles on this topic

summer scroll
#

I have thousands of database entries, and whenever I tried to save all of them on plugin disable, the saving is not successful, the server couldn't wait and force stop happens, how can I solve this issue?
This is my code: https://paste.md-5.net/araqojayir.cs

waxen ledge
upper hazel
#

yes

#

and how i can add another plugin?

#

in my jar

#

exactly inside

#

more precisely, not even a Jar, but a project

#

I searched for tutorials but didn't find any good articles

waxen ledge
#

modules that rely on other modules (for example, if you have a core module that depends on an api module) will have a lower priority

waxen ledge
#

make sure to relocate

upper hazel
#

I want it to be in the form of 1 jar

#

so that you don’t have to install several Jars in the project

#

and don't make an api

#

for example like ItemsAdder (theoretically) with several modules

waxen ledge
#

maybe you can create a module that depends on the other modules so the artifact will contain all these classes

waxen ledge
summer scroll
grim hound
waxen ledge
grim hound
quaint mantle
#

anyway to prevent water from breaking things like redstone or plants?

rotund ravine
#

BlockToFromEvent or smth like that

proud badge
#
public void onDisable() {
    System.out.println("GriefAlert2 Disabled");
}``` wheres the issue? Says *; expected* though I dont see where I am supposed to put a ; here
hazy parrot
#

Can you screenshot

proud badge
#

cant upload screenshots in this channel

hazy parrot
#

?img

undone axleBOT
#

Can't send images? That's because you're not verified! Use !verify to complete verification.
Alternatively, you can upload screenshots to any image hosting site and share the link.

Here's some screenshot utilities that can use to upload images.
Lightshot: https://prnt.sc
Imgur: https://imgur.com/upload
Flameshot: https://flameshot.org

proud badge
rotund ravine
#

You messed up ur brackets

proud badge
#

lemme see

#

damnit now I have to go through 107 lines and see where I messed up

#

uhh where exactly did I mess up, cant find anything? Do you mean on line 111?

#

found it

summer scroll
waxen ledge
#

I'm not sure if that will fix it, but give it a try

#

You can do it via Runtime.getRuntime().addShutdownHook(Thread). In the thread you must perform the save operation

waxen ledge
#

That's another solution

summer scroll
#

Actually I save the data everytime it gets modified.

undone yarrow
#

I have a plugin that spawns particles every x seconds at a specified block. My worry is that this is wayy too inefficient, because these particles will still spawn even if there arent any players closeby right? So, if I have like 2000 of these locations that keeps spawning particles, even when theres 0 players close, it will cause a lot of lagg. At least, that's my assumption. java public void spawnParticlesEverySecond() { BukkitRunnable runnable = new BukkitRunnable() { public void run() { for (Map.Entry<Location, ChestObject> entry : chests.entrySet()) { if (!entry.getValue().isLooted()) { Particle particle = entry.getValue().getParticle(); Location location = entry.getValue().getLocation(); if(location == null){ Bukkit.broadcastMessage("LOCATION IS NULL"); return; } location.add(0.5, 1.2, 0.5); location.getWorld().spawnParticle(particle, location, 7, 0.15, 0.25, 0.15); location.subtract(0.5, 1.2, 0.5); } } } }; runnable.runTaskTimer(plugin, 0L, 20L); }

#

Anyone know if this is true? Aka, if this will cause lagg

rotund ravine
#

Probably not

summer scroll
undone yarrow
summer scroll
#

You can get chunk from Location.

undone yarrow
#

oh k, so thats already stored

summer scroll
#

This is what I have

    public boolean isChunkLoaded() {
        int x = this.location.getBlockX() >> 4;
        int z = this.location.getBlockZ() >> 4;
        World world = this.location.getWorld();
        if (world == null) {
            return false;
        }
        return world.isChunkLoaded(x, z);
    }
undone yarrow
#

right...

#

let me give it a try

summer scroll
#

So if the chunk is loaded, spawn the particle.

undone yarrow
upper hazel
#

blockSpawners this entity??

undone yarrow
#

Oh I can even remove the first 2 lines

summer scroll
undone yarrow
#

Is there a way to test this?

summer scroll
undone yarrow
#

Yup I just found the exact same one

#

Good to know

undone yarrow
summer scroll
# undone yarrow Wat do the >> 4 mean?

I don't know how to explain this properly, but basically a chunk is 16x16 and that's why you can divide by 16 to get chunk coordinates and 16 is the power of 2, we can shift the bits by 4 (>> 4).

undone yarrow
#

ah alright

#

How do I get the colour from a json file?

#

I store the chatcolour as "DARK_PURPLE", but how do I retrieve that value as a chatcolour?

rotund ravine
#

Just store it as string

undone yarrow
#

Incompatible types. Found: 'java.lang.String', required: 'org.bukkit.ChatColor'

rotund ravine
#

.toString

undone yarrow
#

A chatcolor isnt a string

#

Ill try chatcolor.valueof(the string)

hollow lagoon
#

I went to sleep, everything was working and when I came back in the morning, I get an error when I start my server with min plugin on it.
https://pastebin.com/ZAmGP1bJ if you want to help me

echo basalt
#

Shade kyori

nimble oxide
#
        } else if(player.hasPermission(VagtSystem.getInstance().getConfig().getString("vagt_perm"))) {

            ItemStack skull = new ItemStack(Material.SKULL_ITEM, 1, (short) 3);
            SkullMeta meta = (SkullMeta) skull.getItemMeta();
            meta.setOwner(player.getDisplayName());
            skull.setItemMeta(meta);


            GuiItem head = ItemBuilder.from(skull).asGuiItem();


            List<Component> plushDollarLore = new ArrayList<>();
            plushDollarLore.add(Component.text(ColorUtil.chat("&8&l&m--------------------")));
            plushDollarLore.add(Component.text(ColorUtil.chat("&6&lLØN &8- &f&lINFO")));

            GuiItem plushDollar = ItemBuilder.from((api.getItemHead("20446"))).lore(plushDollarLore).name(Component.text(ColorUtil.chat("&6&lVAGT &f&lLØN"))).asGuiItem();




            GuiItem computer = ItemBuilder.from((api.getItemHead("46431"))).asGuiItem();




            GuiItem sculkSensorZ = ItemBuilder.from((api.getItemHead("43979"))).asGuiItem();




            GuiItem plus = ItemBuilder.from((api.getItemHead("2293"))).name(Component.text("test")).lore(Component.text("wwgw")).asGuiItem();



            Gui vagtMenuMain = Gui.gui()
                    .title(Component.text(ColorUtil.chat(VagtSystem.getInstance().getConfig().getString("prefix"))))
                    .rows(5)
                    .create();
            vagtMenuMain.setItem(3, 2, plushDollar);
            vagtMenuMain.setItem(3, 4, computer);
            vagtMenuMain.setItem(3, 6, sculkSensorZ);
            vagtMenuMain.setItem(3, 8, plus);
            vagtMenuMain.setItem(1, 5, head);
            for (int i : new int[]{0, 1, 2, 3, 5, 6, 7, 8}) {
                vagtMenuMain.setItem(i, glassOrg);
            }
            for (int i : new int[]{36, 37, 38, 39, 40, 41, 42, 43, 44}) {
                vagtMenuMain.setItem(i, glassWhi);
            }

            vagtMenuMain.open(player);


            vagtMenuMain.setDefaultClickAction(event -> {
                event.setCancelled(true);
            });

            plushDollar.setAction(inventoryClickEvent -> {
                Gui vagtMenuLΓΈn = Gui.gui()
                        .title(Component.text(ColorUtil.chat(VagtSystem.getInstance().getConfig().getString("prefix"))))
                        .rows(5)
                        .create();
                for (int i : new int[]{0, 1, 2, 3, 4, 5, 6, 7, 8}) {
                    vagtMenuLΓΈn.setItem(i, glassOrg);
                }
                for (int i : new int[]{36, 37, 38, 39, 40, 41, 42, 43, 44}) {
                    vagtMenuLΓΈn.setItem(i, glassWhi);
                }

                vagtMenuLΓΈn.open(player);

            });


        }

why doesnt there show anything up in my GUI? I use triumphteam lib?

#

aswell as headdatabaseAPI

spare hazel
#

imma give the code rn

rotund ravine
#

?paste

undone axleBOT
rotund ravine
#

Don’t cast it to a hashmap @spare hazel

spare hazel
#

what should i do

#

storage.put(NSKeys.ITEM_SPEED_KEY.key, 0f);
storage.put(NSKeys.ITEM_HEALTH_KEY.key, 0f);
storage.put(NSKeys.ITEM_DEFENSE_KEY.key, 0f);
storage.put(NSKeys.ITEM_DAMAGE_KEY.key, 0f);
storage.put(NSKeys.ITEM_TOUGHNESS_KEY.key, 0f);
storage.put(NSKeys.ITEM_FEROCITY_KEY.key, 0f);
storage.put(NSKeys.ITEM_INTELLIGENCE_KEY.key, 0f);

#

this should work

rotund ravine
#

Ur error is a classcast exception

spare hazel
#

i have been working day and night to fix this

#

still no result

#

now im getting an error about loaading shit from a different class

nimble oxide
fringe yew
#

I'm giving the player the absorption effect using player.addPotionEffect(PotionEffectType.ABSORPTION.createEffect(60*20, 5)); but the hearts do not appear, yet when I take damage I can hear the damage effect but my hearts do not deplete until after the absorption is gone.

rotund ravine
eternal oxide
native bramble
eternal oxide
#

Map.of returns an immutable Map

rotund ravine
#

No clue about the remapped stuff

#

?nms

upper hazel
#

What is the disadvantage of a block placed using the method associated with amorstands?

rotund ravine
#

Which method

upper hazel
#

i was not create method I'm speaking in general

#

generating blocks with textures

eternal oxide
#

ask a specific question

upper hazel
#

armor stands are used for this

eternal oxide
#

creating blocks with textures has nothing to do with armor stands

upper hazel
#

wth

#

I was told the opposite before

eternal oxide
#

custom textures are resource packs

upper hazel
#

then how created texture for placed blocks

#

wdym

#

i know it

#

but why you say it

eternal oxide
#

?

upper hazel
#

to create a texture on a placed block you need an armor stand

eternal oxide
#

no you don't

upper hazel
#

lol?

#

then what i need

eternal oxide
#

the block and the texture do not require an armorstand

upper hazel
#

ok let's say so. How then is a texture created for a custom block?

upper hazel
#

for PLASED

#

texture

rotund ravine
#

?customblock

#

?customblocks

#

Rip

upper hazel
#

I’m not asking about creating my own textures, I’m asking about adding it to the supplied block

echo basalt
#

Noteblocks with custom textures

upper hazel
#

noteBlock has customModelData?

eternal oxide
#

no

upper hazel
#

placed noteBlock

#

???

upper hazel
blazing ocean
#

hello, how can I add a fake player to the tablist but the actual player character of them being invisible? so just in the tab list with a custom display name

upper hazel
#

lol and how?

#

i talk obaut custom blocks

#

not vanilla

upper hazel
#

wdym

rotund ravine
#

There is a lot of options

#

The easiest and without the use of entities

#

Is to retexture blocks that aren’t used like noteblocks with certain values

upper hazel
#

what the noteblocks

#

and which ones for example?

earnest socket
#

Is there any event that can check if an arrow has activated a button?

wet breach
#

sponges are a good one

upper hazel
upper hazel
eternal oxide
#

yes

#

and models

#

custom BlockStates and Custom Textures defined and included in a resource pack

earnest socket
#

alright thanks

wet breach
#

so that should work, just check if the entity in question

#

is an arrow πŸ™‚

#

and the block is a button

upper hazel
#

Is it really possible that these types of blocks cannot be obtained in survival?

eternal oxide
#

no they can't

#

well, not without your plugin doing lots of fuckery

upper hazel
#

this approach clearly must have its downsides, I think

rotund ravine
#

Why

eternal oxide
#

yes, you have to be very careful to not allow state changes to the blocks

upper hazel
#

wait, is this related to the way the texture of an item with variable durability is changed?

eternal oxide
#

kinda

pseudo hazel
#

its closer to how there is a furnace texture and a separate texture for when the furnace is on

eternal oxide
#

durability used to be a way before texture/resource packs

pseudo hazel
#

with noteblocks there are a bunch of states that dont occur that you can change the model of if I understand correctly

eternal oxide
#

yep

#

I've not done it myself but years of being in here.

upper hazel
pseudo hazel
#

its the same block

#

you would give your players a noteblock by all means

#

but you just change the state it has

#

but im sorry to say I have not done this myself , just like elgarl