#help-development

1 messages ยท Page 2050 of 1

sterile token
#

And really thanks :D

chrome beacon
#

1.7 :kekw:

tardy delta
#

what should i test exactly?

sterile token
grim ice
#

ur wasting resources

sterile token
#

Im still thinking if the Cuboid#contains() will work

grim ice
#

u have a browser + discord open

#

use discord website

#

if ur gonna use a browser

sterile token
#

2Hex

#

Can i ask sth?

grim ice
#

mhm

sterile token
#

How can i check if any location its inside a cuboid?

tardy delta
#

8gb ram

grim ice
tardy delta
#

and sometimes slow af while coding and minecraft at the same time

grim ice
#

check the xyz of each point

#

and check if its inside them

#

e.g 100, 100, 100 & 10, 10, 10
20, 20, 20 would be inside that

tardy delta
#

well i dont see why this wouldnt work

grim ice
#

thats some very weird constructor

#

i would do two args

#

Location, Location

#

or 6 doubles

sterile token
#

I cannot pass 2 locations, because i will work with 1 location

grim ice
#
return ((biggerPoint.getX() > containArg.getX() && biggerPoint.getY() > containArg.getY() && biggerPoint.getZ() > containArg.getZ()) && (smallerPoint.getX() > containArg.getX() && smallerPoint.getY() > containArg.getY() && smallerPoint.getZ() > containArg.getZ()) ```

__biggerPoint__ should be the point that has each of its (x, y, z) coordinates maxed with the other point coordiantes, with Math#max.
e.g:
```java
Location firstLoc = new Location(world, x, y, z);
Location secondLoc = new Location(world, a, b, c);

So:

Location biggerPoint = new Location(Math.max(x, a), Math.max(y, b), Math.max(z, c));
Location smallerPoint = new Location(Math.max(x, a), Math.max(y, b), Math.max(z, c));
sterile token
#

I have to based on protection block location, calculate the 2 corners

grim ice
#

return should be like that

sterile token
#

Hex?

#

I explain, my idea is to work with 1 location (protection block), and based on that location get 2 corners (a = negative, b = postiive)

#

And them i dont know how to check if the location im pasing its inside the 2 corners

grim ice
#

eitherway i showed u

#

how to check if a block is inside 2 locations

#

another example

sterile token
#

Allright

#

Thanks

sterile token
#

Because i dont the radiuos of protection and the amount of them

echo basalt
#

it will do fine

sterile token
#

Idk where people woud run it

#

That my big issue

grim ice
#

well computers are way faster than you think

echo basalt
#

^

#

Premature optimization often ruins performance

sterile token
#

Allright

grim ice
#

and what java does

#

is

#

return (a >= b) ? a : b;

echo basalt
#

if you're doing those checks

#

then java's compiler will understand that and make more optimized assembly code

#

so don't worry about min and max checking

dark arrow
#

how can i give player dyed leather armour cuz its not on the item list

echo basalt
#

You can run billions of checks every second

sterile token
#

Hex your paste link its down

echo basalt
dark arrow
#

ohh

echo basalt
#

LeatherArmorMeta

dark arrow
#

If i use meta. then what is the name?

#

there is not set color

sterile token
sterile token
#

Location: x=230, y=71, z=258
Radius: 5

Corner 1: x=225, y=66, z=253
Corner 2: x=235. y=235, z=263

Do you think they are correct?

#

Im trying to calculate 2 corners based from 1 location

#

I dont think the corners are correct

#

Ah sorry i forget stm

#

in the info

#

Already updated, i forget the radius

#

Because im calculating 2 corners from a block and a radius

#

Im trying to apply the plugin protection (but using a block) logic

grim ice
#

@sterile tokeni mean

#

a cuboid usually have 2 locations

#

so i would make it so

#

then you calculatet your 2 locations yourself

#

which is ur own logic

#

or make a RadiusCuboid class

sterile token
#

What number?

grim ice
#

that implements Cuboid

sterile token
#

I already give u the numbers

#

I just used the player location and the radius

quaint mantle
#

Hello everyone making a ChestGUI class

grim ice
#

and

sterile token
#

And this is my class:

public class Cuboid {

    private final Location a;
    private final Location b;

    public Cuboid(Location location, Integer radius) {
        this.a = new Location(location.getWorld(), location.getX() - radius, location.getY() - radius, location.getZ() - radius);
        this.b = new Location(location.getWorld(), location.getX() + radius, location.getY() + radius, location.getZ() + radius);
    }

    public Location getLocationA() { return this.a; }

    public Location getLocationB() { return this.b; }
}
quaint mantle
#

Can anyone help with Consumer<InventoryClickEvent>?

sterile token
#

Do you wait it?

keen basin
#

how can i open gui with bungeecord plugin ?

grim ice
sterile token
grim ice
#

would make a Cuboid interface

#

then you implement it naming your new class RadiusCuboid

sterile token
#

Allright i dont so god

quaint mantle
sterile token
quaint mantle
#
public void setItem(int x, int y, ItemStack item, Consumer<InventoryClickEvent> event) {
        if (allowed) {
            if (x < 1 || x > 9 || y < 1 || y > row) {
                throw new IllegalArgumentException("The location of the item is entered incorrectly");
            } else {
                inventory.setItem(9 * (x - 1) + (y - 1), item);
                this.event = event;
            }
        }
    }
sterile token
#

Hex i never worked with Cuboid before that why im so noob

sterile token
quaint mantle
#
private Consumer<InventoryClickEvent> event;
keen basin
grim ice
#

where the class should implement

#

Cuboid<Location>

quaint mantle
grim ice
#

and n the RadiusCuboid class

#

u should calculate radius and stuff

#

since not every cuboid works like that

quaint mantle
#

I've already looked through the libraries, and it's hard for me to understand it

grim ice
#

in fact most of the times it works with providing 2 corners

#

not one corner that you get the one from

sterile token
#

Im so confused and looking so freaking noob

grim ice
#

well what i told u was design tips

sterile token
#

So can u make a sample

smoky anchor
#

Hello.
Anybody got any idea on how to prevent big dripleaf from tilting?

grim ice
sterile token
#

Its only math?

hardy swan
#

unpopular opinion: you cannot

hardy swan
tardy delta
smoky oak
#

how do i define defaults in the configuration here?

tardy delta
#

config.getInt("my.int", 3)

dark arrow
#

I am not able to get to use dyed lether armour as it is not in list

smoky oak
#

'if a default has been identified in the root Configuration'

#

i know what parameters are

#

the issue i have is that there's a path that essentially is *.visual.*.int where * can be any kind of string

tardy delta
#

there is no way to use a * as wildcard

#

you have to loop over the section

smoky oak
#

uh one sec

#

?paste

undone axleBOT
smoky oak
#

basically

#

for every declared name there's a field visual under which there's a list of effects

#

the name of the effect doesnt matter since the loop is for(String s : ConfigurationSection.getKeys(false))

#

but i do wish to define default values to reduce the size of the config

grim ice
#

in need of library ideas

smoky oak
tender shard
#

I'd definitely use it

smoky oak
#

seriously why the fuck is there no onJump event

tender shard
dusty herald
#

PlayerMoveEvent

tender shard
#

nah

#

way easier

#

PlayerIncrementScoreEvent

#

check if score == Score.JUMP

#

or whatever

smoky oak
#

wait

#

noted

dusty herald
#

wow that's genius

smoky oak
#

yea

dusty herald
tender shard
smoky oak
tender shard
#

although paper API has so much useful stuff, I wouldn't use it myself until absolutely needed

vocal cloud
#

Yeah making a non insane language library would be cool

#

Especially if items worked in it

tender shard
#

yes we need a proper language file lib

#

my configs currently look like this

#

whoops same screenshot twice, sry

modern vigil
#

Is the principle of Enchantments#getByKey the same as Material#valueOf?

smoky oak
#

query

tender shard
#

so yeah the translations are 900 lines out of a 1800 line config file

smoky oak
#

why not use english only

grim ice
tender shard
tardy delta
#

i have an enum for all my language things

tender shard
#

en.yml:

message1: Some text
message2: Some other text

german.yml:

tardy delta
#

so the path in the config and a default value

tender shard
#
message1: Irgendein Text
grim ice
#

Ic

tender shard
#

note that message 2 was not translated yet, so it has to use the default of en.yml

#

but now imagine a third message gets added

#

it automatically would have to add the new translation to all existing files, keeping the changes that were already done

grim ice
#

that doesnt seem too complicated

tender shard
#

it would however also have to add untranslated messages as comment

#

so people know what messages aren't translated yet in each lang file

#

yeah it's not complicated at all, just a bit tedious

grim ice
#

how do you think the usage should be like

tender shard
#

and people would then just do

LangLib.getMessage("message1")
grim ice
#

(the code the user types)

#

o

tender shard
#

or maybe even provide a player and use that player's client language but I personally wouldn't need that

grim ice
#

LangLib.getMessage("message1", Language.ENGLISH)

#

i think

tender shard
#

yeah more like this:

LangLib.getMessage("message1",player);
tender shard
#

if player uses English, get english.yml
if they are german, use german.yml

smoky oak
#

that actually sounds super easy

tender shard
#

it is

#

the only annoying thing is the automatic config updates

grim ice
#

Launching IntelliJ

manic furnace
#

How can I get the real names of the methods?

vocal cloud
#

You could go a step further and make it so that custom items could have translations

grim ice
#

nah thats logic for the user to do

smoky oak
grim ice
#

I provide the essentials with a library, the user has to implement logic

smoky oak
#

remember to refactor afterwards with the plugin

#

othersiwe its illegal

tender shard
#

yeah as said, imagine you have an existing file

message1: "Message 1"

and in german:

message1: "Nachricht 1"

Now you update your plugin and it also has a message2. obviously you don'T know german so the default german file can'T get updated. it should howeer now look like this automatically:

message1: "Nachricht 1"
### The following messages weren't translated yet. Translate them them uncomment them yourself pls
#message2: "Message 2"
manic furnace
grim ice
#

Oh

#

so if its not set

#

it uses the default

smoky oak
#

i think theres a spigot post about that

manic furnace
#

Thanks

tender shard
#

(it's for maven only)

smoky oak
#

good enough

tardy delta
#

imagine not using maven

smoky oak
#

gradle

tender shard
sterile token
#

Hex, someone told me this yesterday:

Vector bp = protection lbock location
Integer radious = 10;

Cuboid cuboid = new Cuboid(
  new Vector(bp.x - r, bp.y - r, bp.z - r),
  new Vector(bp.x + r, bp.y + r, bp.z + r)
);```
tender shard
#

Maven: easy to use, can do almost anything
Gradle: harder to use, can do almost anything + a tiny bit more but most people don't need that "tiny bit more"

tardy delta
#

maths aah

smoky oak
#

if you translate that into blocks it's 21 blocks tho

#

thanks to how coordinates work

sterile token
smoky oak
#

yea

#

and the block in the middle exactly has the coords of bp

tender shard
# grim ice it uses the default

and now imagine that your "message2" translation in german gets added in a next update. you want to add to the existing lang file that already has the "default" translation inside

smoky oak
#

you count coords from block corners

tender shard
#

so yeah it's not as easy as it sounds

sterile token
# smoky oak yea

So using that class method i can create a plugin protection based on a block?

smoky oak
#

guess so

#

it only gives you the area around a block you parse to it tho

woeful crescent
#

what's the best way to do damage knockback reductions?

tender shard
#

@grim ice and call it "TransLib" lol

#

#yeshomo

woeful crescent
#

just multiply velocity one tick later?

grim ice
#

alright then ill make it look like this:
LangLib lang = LangLib.create(this);
lang.createLang(Language.ENGLISH, Level.DEFAULT_LANG);
lang.createLang(Language.GERMAN);
// or lang.createLang(Language.GERMAN, Level.SECONDARY);

lang.addMessage(Language.ENGLISH, "name", "Jack");
lang.getMessage(Language.GERMAN, "name"); // returns Jack
lang.addMessage(Language.FRENCH, Language.GERMAN, "name", "Duke");
lang.getMessage(Language.GERMAN, "name"); // returns Duke

tender shard
#

it should do all of that automatically

sterile token
tender shard
#

it should only require resources/lang/de.yml etc files

grim ice
#

de?

quiet ice
#

de = german

tender shard
#

it should not require anything besides TransLib.init() or TransLib.load() and of course TransLib.getMessage("...")

grim ice
#

oh yea

tender shard
#

yes de = german

grim ice
#

o

tender shard
#

DEUTSCH

#

you know

grim ice
#

but how am i supposed to know the language

tender shard
#

TransLib.init("en")

#

TransLib.init("de")

quiet ice
tender shard
#

or similar

sterile token
grim ice
#

yeah so it just creates files

tender shard
grim ice
#

with what

#

it updates it manually

quiet ice
#

The specification behind the locale strings is really bad imo

tender shard
#

with the default english message, if no translation is provided, or with the new translation if one is provided

quiet ice
#

I'd rather use the ISO3 strings instead of the ISO2 ones

tender shard
#

?paste

undone axleBOT
grim ice
#

bruh so it just copies the default lang into the language u specify, then u havee to manually write them

pliant oyster
#

anyone here good at math and particles wanna help me

smoky oak
#

*yes no maybe

pliant oyster
#

bet

#

I'm trying to make particles rotate an entity

tender shard
#

https://paste.md-5.net/xigehuhovi.shell
Imagine I now decide to add a new message "message-something". obviously I can add that message to the english config but I don't know azerbaijan turkish, so azerbaijan file should automatically get the default english message added. But when now I have someone contributed a translation in azerbaijan for "message-something" it should automatically replace the default message with the new translated one

pliant oyster
smoky oak
#

uh

smoky oak
#

how are particles supposed to rotate entities

tender shard
smoky oak
#

i mean you can project an image and rotate that and copy the rotation onto an entity

#

but that's about the onyl idea i have

woeful crescent
#

changing the knockback caused by a player being damaged, sorry

tardy delta
#

@sterile token why do you need the center of the claim?

pliant oyster
#

xD

#

I cba to learn math

tender shard
smoky oak
#

i can do math but my math never works -.-

pliant oyster
#

lmao

smoky oak
#

like i put the 0 in the wrong place

pliant oyster
#

anyone else got an idea?

smoky oak
#

effect duration stayed the same

#

but i only got blinking particles appearing for a few frames

tender shard
# pliant oyster lmao

weren't you the person who said you liked my voice? if so, I am happy to announce that I was booked to record an audio book for "fan man" by william kotzwinkle lol

smoky oak
#

bruh mans got a job

pliant oyster
#

lmao

tender shard
#

I have like 30 jobs but none of those is a proper one lol

smoky oak
#

ah that makes more sense

pliant oyster
tender shard
#

sure, but

smoky oak
#

1+1 yes

tender shard
#

my school was 10 years ago

smoky oak
#

get the derivative from x^-x

pliant oyster
#

xD

smoky oak
#

no

pliant oyster
#

math in coding

#

like I'm trying to make particles spin around an entity

tender shard
pliant oyster
#

breh

tender shard
grim ice
pliant oyster
tender shard
grim ice
#

i feel like im misunderstanding it

tender shard
pliant oyster
#

like tf is a unit circle

grim ice
#

Is it really just a copy paster from a file to another until u can change it urself?

torpid frost
#

Hey !

vocal cloud
manic furnace
#

Ok I did that, but now things like the WorldServer are missing

tender shard
grim ice
#

thats not what i mean

tender shard
grim ice
#

a copy paste from file (.yml) to another (.yml)

tender shard
pliant oyster
#

idk how it works lmao

tender shard
#

as said, it's 10 years ago that I had to do it lol

modern vigil
#

Does a Set do anything to it's values once one is added?

desert loom
tender shard
#

well

#

yes

#

what Set?

#

HashSet for example calls every object's hashCode() method when you add a new object

modern vigil
#

I'm storing a data struct (yes, in kotlin) with 2 props, data and item

#

Where item is an ItemStack

tender shard
#

what Set are you using? HashSet?

grim ice
#

BTW MFN

modern vigil
#

MutableSet

tender shard
#

does your custom class ("struct", or whatever) override hashCode()?

grim ice
#

if i make an object and override its hashCode method

modern vigil
#

nope

grim ice
#

with some really intensive spammy code

tender shard
grim ice
#

will a hashset containing it

#

lag

modern vigil
#

Can I send some screenshots of the values I logged?

tender shard
#

if your stuff doesn't override hashCode, the set will basically just do this:

for(Struct struct : yourSet) {
  if(struct == myNewObject) {
    return;
  }
}
add(myNewObject)
minor garnet
tender shard
minor garnet
#

final boolean headshot = entity instanceof LivingEntity && isHeadshot(intercept.pos, (LivingEntity) entity);

#

discord down?

tender shard
#

you cannot cast an NMS entity to a bukkit one

earnest wave
#

hi uh is there example plugins with comments so that i can reverse engineer it to know how and why it worked?

tender shard
pliant oyster
minor garnet
#

wait

modern vigil
#

oh wait i might have found the cause

earnest wave
tender shard
modern vigil
#

are enchantments and item meta related?

tender shard
tender shard
#

ItemMeta.getEnchantments() or whatever

modern vigil
#

so if i set the meta after adding an enchant, it will override the enchants, correct?

grim ice
#

btw

#

how does speeding up a video work

tender shard
torpid frost
#

Hello, i was asking, do you know how you can add a data in a block the first time he is broken, if it's the first time, you have something and if it's replaced then rebroken it do nothing (sorry for my bad english)

tardy delta
#

what kind of data?

tender shard
torpid frost
#

just yes or no for exemple

tender shard
#

add data to a block that gets broken? that makes no sense, why would you add data to something that will be removed anyway

torpid frost
#

imagine you are in a cave and you break a iron ore

tender shard
tardy delta
#

that will drop iron ore/ raw iron

#

or ore block if you have silk touch

modern vigil
torpid frost
#

yep

modern vigil
#

?pdc

tender shard
tardy delta
#

that looks weird lol :c

minor garnet
#

what

tardy delta
#

the guns

modern vigil
#

I don't 100% remember how i did it, but i'll check

torpid frost
#

ok

minor garnet
#

you mean the purple texture ?

tender shard
#

tbh this looks like the first cracked version of Counterstrike I ever used when I was like 10 years old

#

purple textures, "missing texture" texture, etc lmao

#

but yeah this looks awesome

modern vigil
#

I set it on the block metadata

minor garnet
#

i making the backend system first

tender shard
#

the block's metadata will reset on server restart

#

it is NOT persistent

modern vigil
#

o h

tender shard
torpid frost
#

thx

#

i'll check this

modern vigil
#

alr i fixed my problem aswell

#

it works

grim ice
#

right?

tender shard
#

if you wanna speed it up by exactly 50%, then yes

#

if you wanna go for 33%, you'll have to interpolate

dark arrow
#

Which event should i use to check if player is wearing a specific armor?

tender shard
#

to just check the armor they already wear, obviously there is no event for that

#

events are called when things are CHANGING

#

they are not called to check a non-changing thing

dark arrow
#

I will make a if condition for that

tender shard
dark arrow
#

but i need to call an even to get player properties

#

will playerjoinevent work?

tender shard
#

what are you trying to achieve?

#

this seems to be an xy problem

#

?xy

undone axleBOT
tardy delta
#

not every block has a pdc only the one with a tilestate right?

tender shard
#

that's why I made my CustomBlockData lib

dark arrow
tender shard
tardy delta
#

does that allow blocks to have its own pdc or what?

tender shard
tardy delta
#

are you saving the data on the chunk instead? ๐Ÿ‘€

tender shard
#

yes

tardy delta
#

aha

dark arrow
tardy delta
#

thats what i did in my protection plugin

tender shard
tender shard
# grim ice

there is basically two approahces to "speed up" videos. Imagine ABC etc are frames.

Normal video:

ABCDEFG

Sped up 50%:
ACDF

Sped up 33% though, it gets tough. You can either do this;

ABDFG (which will look weird)

or do this:

A [mixture of B/C] D [mixture of E/F] G

dark arrow
#

I have created a custom armor which has certain enchants and when player wear it how can i give that player some effects like slowness and remove that effect so can anyone give me suggetion related to it ?

tender shard
#

use the ArmorEquipEvent ( https://github.com/JEFF-Media-GbR/ArmorEquipEvent ). when a player equips the armor, apply them an "unulimted" potion effect (duration = Integer.MAX_VALUE, that's about 4 years so more than enough) and when they unequip it ( same event will be called ), remove the potion effect again

GitHub

Contribute to JEFF-Media-GbR/ArmorEquipEvent development by creating an account on GitHub.

dark arrow
#

ohk ok Thanks

#

is it custom event ?

tender shard
#

yes, you either have to add it as dependency and shade it ( it's expalined in the README file) or copy/paste all the code

dark arrow
#

ok thx

tender shard
#

np

dark arrow
#

sorry for irritating you

tender shard
#

good luck, ping me if you got questions ๐Ÿ™‚

tender shard
dark arrow
grim ice
spare canyon
#

can i load a world multiple times?

#

like multiple instances of the same world

tender shard
#

why would you want to do it?

#

pls explain why you need to load the same world more than once

hybrid spoke
dark arrow
tender shard
tardy delta
#

repository?

fiery jacinth
#

my server crashes i dont understand error codes

dark arrow
tender shard
spare canyon
#

minigame plugin, have a map, when a game is created the plugin would make an instance of the map, put the players there, the minigame would happen, then the plugin would just simply delete the instance

tender shard
#

?paste

undone axleBOT
dark arrow
tender shard
#

I mean

#

of course you can just copy the world folder

#

but that seems like a dirty hack

hybrid spoke
tender shard
spare canyon
#

exactly

#

^

dark arrow
hybrid spoke
#

like an arena mode?

spare canyon
#

i just build the map once and with every new game it's just cloned and deleted

#

yes

tender shard
#

I don't any better way than doing this:

  1. Copy "myminigameworld" folder to "myminigameworld1"
  2. Start the game in the new copied world
  3. if you want to start another game, copy "myminigameworld" to "myminigameworld2"
  4. etc etc
hybrid spoke
#

never really looked into that

#

either its copying the world

tender shard
hybrid spoke
#

or you have several arenas at one world

undone axleBOT
dark arrow
hybrid spoke
#

and hide all of the other arenas and players if they are not necessary for the current fight

spare canyon
#

but

#

how do i hide arenas lol

hybrid spoke
#

packets

spare canyon
#

i only know about hiding players

dark arrow
spare canyon
#

bruh

#

am bad at that

eternal needle
#

Hi I need help with rtp so when they do the command they don't land in water don't get it to work, tag me

this is my code

import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.block.Block;
import org.bukkit.entity.Player;

import java.util.HashSet;
import java.util.Random;

public class Rtpmere {



    public static HashSet<Material> bad_blocks = new HashSet<>();

    static {
        bad_blocks.add(Material.LAVA);
        bad_blocks.add(Material.WATER);
        bad_blocks.add(Material.FIRE);

    }

    public static Location generateLocation(Player player){
        Random random = new Random();

        int x = 0;
        int y = 0;
        int z = 0;

        int borderSize = (int) player.getWorld().getWorldBorder().getSize()/2;
        int min = borderSize-borderSize*2;

        x = random.nextInt(borderSize + 1 - min) + min;
        y = 150;
        z = random.nextInt(borderSize + 1 - min) + min;

        Location randomLocation = new Location(player.getWorld(), x, y, z);

        y = randomLocation.getWorld().getHighestBlockYAt(randomLocation);
        randomLocation.setY(y);

        while (isLocationSafe(randomLocation)){
            randomLocation = generateLocation(player);
        }

        randomLocation.setX(randomLocation.getX()+ 0.5);
        randomLocation.setY(randomLocation.getY()+ 1);
        randomLocation.setZ(randomLocation.getZ()+ 0.5);

        return randomLocation;
    }

        public static boolean isLocationSafe(Location location){

            int x = location.getBlockX();
            int y = location.getBlockY();
            int z = location.getBlockZ();


            Block block = location.getWorld().getBlockAt(x, y, z);
            Block below = location.getWorld().getBlockAt(x, y - 1, z);
            Block above = location.getWorld().getBlockAt(x, y + 1, z);


            return !(bad_blocks.contains(below.getType())  || (block.getType().isSolid() || (above.getType().isSolid())));
        }
}

tender shard
#

try to run this command pls:

mvn clean package -U
hybrid spoke
spare canyon
# hybrid spoke packets

if i use packets, can i just put all the players into the same arena but hide blocks/arrows/players/everything from other arenas to the player in a certain arena?

tender shard
#

click the button I marked in red, then enter the mentione command

tender shard
# dark arrow where?

see screenshot above. first click on the thing I marked in red, then enter mvn clean package -U

hybrid spoke
#

there probably would happen some weird things

dark arrow
#

but still the error

spare canyon
#

i just checked org.bukkit.commands.default and /clone is not there, is there a function to clone regions within a world or do i have to maek myself

dark arrow
#

i can still complile my plugin

tender shard
dark arrow
#

i am the one asking help

tender shard
dark arrow
#

nah its ok

#

being pls will be too formal

tender shard
#

as alternative: clone my github repo ( the one with the ArmorEquipEvent) in IntelliJ, then just do "maven install" on that one

#

now you'll have it

tender shard
#

bind f "use weapon_flashbang;"

fiery jacinth
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!

tender shard
#

they already did, my guess is they are using a totally outdated world data pack

tender shard
dark arrow
sterile token
dark arrow
tardy delta
sterile token
sterile token
dark arrow
#

i used git bash

sterile token
dark arrow
#

yah

tender shard
dark arrow
#

ok i did it

sterile token
dark arrow
dark arrow
#

thx so much for helping

#

good night

sterile token
eternal needle
undone axleBOT
eternal needle
grim ice
#

what ur doing will crash the serve

#

server

#

but slowly probably

#

its a never ending loop

tardy delta
#

EnumSet is something

#

the signature is class EnumSet<E extends Enum<E>> right?

grim ice
#

EnumSet.of(Material.FIRE, Material.WATER, Material.LAVA);

#

or MutableSet.of(...)

#

or

#

Set<Material> disallowedTypes = new HashSet<>(Arrays.asList(Material.FIRE, Material.WATER, Material.LAVA));

#

or Sets.newHashSet(Material.FIRE, Material.WATER, Material.LAVA);
this needs guava but its included with spigot

eternal needle
sharp bough
#

is something wrong here?

WorldCreator wc = new WorldCreator("ctest1");

            wc.environment(World.Environment.NORMAL);
            wc.type(WorldType.FLAT);
            wc.generatorSettings("2;0;1;");

            wc.createWorld();

error: https://pastecord.com/ogomaqagef.properties
from https://www.spigotmc.org/threads/create-a-new-world.384473/

#

im trying this now

WorldCreator wc = new WorldCreator("world name");

wc.environment(World.Environment.NORMAL);
wc.type(WorldType.NORMAL);

wc.createWorld()

and i think its working

drowsy harness
sharp bough
#

anyone knows why?

livid coral
#

Hiiii

woeful crescent
#

hey there. on my server, invulnerable entities are getting damaged by explosions. how do i fix this?

livid coral
#

header:
- "&c&lHandoria"
- "&7&l>> %animation:Welcome%&3 &l&9&l%player%&7&l! &7&l<<"
- "&a&lGracze Online: &r&a%online%"
- "&6&lAdministracja Online: &r&e%staffonline%"

#

how to make %online% with custom players?

minor garnet
#

what do you mean custom players

vast sapphire
#

I want to increase the cost of an item for each level, like multiply the level by 2 and the level maxes out a 5. I could do a switch statement for each level but that's not the best way to do it, how would I do something like that?

sterile token
desert tinsel
#

why I get that error: Cannot resolve symbol 'Arena' in:

sterile token
lapis widget
vast sapphire
#

Oh thanks lmao, that was easier then i made it out to be

desert tinsel
#

oh thx

sterile token
#

What do you think? I have refactored my cuboid class:

public class CircleCuboid implements Cuboid<Vector> {

    private final Vector first;
    private final Vector second;

    public CircleCuboid(Vector location, Integer radius) {
        this.first = new Vector(location.getX() - radius, location.getY() - radius, location.getZ() - radius);
        this.second = new Vector(location.getX() + radius, location.getY() + radius, location.getZ() + radius);
    }

    @Override
    public Vector getFirstPoint() { return this.first; }

    @Override
    public Vector getSecondPoint() { return this.second;}
}
#

Because i need to calculate 2 corners from a block in the middle

#

Yeah

#

The area i get its lcoation

#

So it come with x, y z

undone axleBOT
sterile token
#

I explain why, on place event i get the location.toVector() of the placed block. And them using a radius (how much blocks will protect around) i calculate the 2 corners

#

Prob will have to do a model on mc how it will looks so its better to understand

grim ice
#

you cant have a circlecuboid

#

i would name it

#

RadiusCuboid

#

Nah he just had some naming problems ig

#

btw just wanted to say

#

is amazing

#

i wouldve suffered without it

#

u can use

#

to setAmount(0);

sacred mountain
#

hey is it possible to make a player run a command/chat message, but bypassing needed permissions?
player#dispatchCommand() and player#chat() both work, but permission is needed

#

i could give them the permission and then remove it right after but idk

river oracle
#

If i were you I would try to send the command through console command sender than use the player name as an arg if possible

sacred mountain
#

nah but i have to run it AS the player

#

and not everything has an arg for that

river oracle
#

if you have to run it as the player giving them the permission and revoking it will be your best option

sacred mountain
#

opping the player seems crude

#

but i dont rly see another way

#

around it

river oracle
#

well what type of command are you executing?

sacred mountain
#

sudo

#

hm? i might have a look at the source

river oracle
#

temp op is scarry lol idk how else I would do it though

sacred mountain
#

the essentials one

#

user.getBase().chat("/" + command);

#

nvm thats their own user

river oracle
#

i'd trace that back

lost matrix
sacred mountain
#

wdym

lost matrix
sacred mountain
#

it works for both command and messag

#

im making a sudo plugin

#

its just meant to bypass all permissions whne you sudo a player, but im not sure how to do so without temp-opping

#

meant to run the command as if the player WAS an operator (or had "*" permissions)

lost matrix
#

Ah i see. For safety i would use their PDC or ScoreboardTags to tag them and listen in the PlayerJoinEvent for this tag. Just in case.

sacred mountain
#

but not actually make them an op

river oracle
#

what is a situation where you would use sudo to have a player send a command they wouldn't have perms to?

sacred mountain
#

or sudo <player> tp <location>

#

idk the normal stuff

#

bad examples, but

kind hatch
sacred mountain
#

just in general there are some times where the command doesnt have an optional player arg

#

that i can use

lost matrix
lavish hemlock
#

I think you can dispatch commands through Bukkit but iirc it's really not recommended lol

kind hatch
#

Was that mentioned somewhere?

lavish hemlock
#

Oh and actually would still require permissions, since it uses a specific sender

sacred mountain
#

oof

kind hatch
lavish hemlock
#

You better be careful with something like temp permissions though.

kind hatch
#

The PDC could work as well, it's just that the metadata api has that perk of not being persistent.

sacred mountain
#

i dont know how i would find the permission for the exact command though, so it would have the be temp op

#

since permissions are not directly linked to commands

lavish hemlock
#

One sec

sacred mountain
#

also apparently the 1.13 /execute as <player> run <command> bypasses permissions

#

the vanilla thing

lavish hemlock
#

Does getPluginCommand allow you to get any command?

sacred mountain
lavish hemlock
#

If so, then you can check the permission via getPluginCommand(name).getPermission().

lost matrix
#

I would say this is 99.9% safe:

  public static final String OP_TAG = "__OP__";

  public void sudoChatOp(Player player, String message) {
    boolean originalOpState = player.isOp();
    try {
      player.getScoreboardTags().add(OP_TAG);
      player.saveData();
      player.setOp(true);
      player.chat(message);
    } catch (Exception exception) {
      exception.printStackTrace();
    } finally {
      player.setOp(originalOpState);
      player.getScoreboardTags().remove(OP_TAG);
      player.saveData();
    }
  }

  @EventHandler
  public void onJoin(PlayerJoinEvent event) {
    Player player = event.getPlayer();
    if (player.getScoreboardTags().contains(OP_TAG)) {
      player.setOp(false);
      player.getScoreboardTags().remove(OP_TAG);
    }
  }
river oracle
#

in event of exception I would remove op status too

sacred mountain
#

i like spoonfeed lmao

lost matrix
lavish hemlock
river oracle
#

oh yeah

#

lol

lavish hemlock
#

Honestly... not quite sure why finally exists sometimes.

river oracle
#

i always forget about it

#

I usually just close streams with it

#

which I'm pretty sure is why it exists

lost matrix
lavish hemlock
kind hatch
lavish hemlock
#

Well it's used for closing resources pre-try-with-resources

#

Which was uh... Java 7, iirc

sacred mountain
#

of scoreboard tags

lost matrix
sacred mountain
#

o ok whats wrong with metadata

lost matrix
#

not persistent

sacred mountain
#

if they logout?

#

ok

kind hatch
#

and?

lavish hemlock
kind hatch
#

What would it matter if it's not persistent?

kind urchin
#

Heya, I'm trying to understand how to add MySQL usage to my plugin. I'm using Gradle and this is my build.gradle:

    id "com.github.johnrengelman.shadow" version "7.1.2"
    id 'java'
}

group 'xyz.gekoplugin'
version '1.0.0-SNAPSHOT'

repositories {
    mavenCentral()
    maven { url 'https://oss.sonatype.org/content/repositories/snapshots' }
//    maven { url 'https://hub.spigotmc.org/nexus/content/repositories/snapshots/' }
    maven { url 'https://papermc.io/repo/repository/maven-public/' }
}

dependencies {
    implementation 'com.zaxxer:HikariCP:5.0.1'
    implementation 'mysql:mysql-connector-java:8.0.28'
    compileOnly 'io.papermc.paper:paper-api:1.18.2-R0.1-SNAPSHOT'
    compileOnly 'net.luckperms:api:5.4'
}


shadowJar {
    project.configurations.implementation.canBeResolved = true
    configurations = [project.configurations.implementation]

    shadowJar.minimize()
}

There aren't many resources out there utilizing Gradle, couldn't figure it out. When I run shadowJar task and use the created .jar I'm getting java.lang.ClassNotFoundException: com.mysql.jdbc.jdbc2.optional.MysqlDataSource exception.

sacred mountain
#

but whats wrong with not persistant

kind hatch
#

It's a temporary permission check anyways.

lost matrix
# kind hatch and?
  @EventHandler
  public void onJoin(PlayerJoinEvent event) {
    Player player = event.getPlayer();
    if (player.getScoreboardTags().contains(OP_TAG)) {
      player.setOp(false);
      player.getScoreboardTags().remove(OP_TAG);
    }
  }
kind hatch
#

You're missing the point.

lavish hemlock
kind hatch
#

You don't even need to use setOp() when you can just do an alternative check to the standard permission check.

kind urchin
river oracle
#

is paper packaged with mysql?

lavish hemlock
#

Well Paper's built off Spigot so they probably retain the connector

#

Unless they don't

lost matrix
lavish hemlock
#

Lemme check, I have a Paper test server somewhere

#

They do

kind urchin
#

The driver I'm trying to load is the following: dataSource.setDataSourceClassName("com.mysql.jdbc.jdbc2.optional.MysqlDataSource"); (dataSource being Hikari)

lavish hemlock
#

Paper 1.18.1 uses mysql:mysql-connector-java:8.0.27

kind hatch
#

@lost matrix How would the persistence be preferable for a temporary permission? In what case would it be necessary to keep it persistent when the use case it's being applied in doesn't have any need for persistence?

lost matrix
kind hatch
lavish hemlock
#

It adds a scoreboard tag so that, in the event of a server crash or other issue, the player does not retain op.

kind hatch
#

Yea, but why do you need to set them as OP?

lost matrix
kind hatch
#

You just need to check something else.

sacred mountain
#

temporary as in milliseconds

#

or less

kind hatch
#

Temp permissions. You know, similar to LuckPerms? There's options to define periods of time when the player has those permissions. EG. player has plugin.command.whatever for 10 minutes. In this case, it's technically in milliseconds since it's being removed right after code execution.

lavish hemlock
#

Would be nice if Bukkit's permissions system allowed for a safer alternative to temp-OP

#

Something like a... "run as privileged user."

#

Would be nice if Bukkit had a good permissions system to begin with.

#

I'd PR Bukkit but it'd never get accepted.

#

And there's already 500 permissions plugins out there.

sacred mountain
#

i was messing around with some stuff, and is this an alternative for pdc? idk what it actually does
player.setMetadata(player.getUniqueId().toString(), new FixedMetadataValue(plugin, "hi"));

sacred mountain
lavish hemlock
#

I think player metadata isn't persistent...? I've literally never used it though.

lavish hemlock
#

Check the docs.

sacred mountain
#

A FixedMetadataValue is a special case metadata item that contains the same value forever after initialization.

tardy delta
#

never used it too

#

๐Ÿ‘€

sacred mountain
#

from the doc lol hi doc

sacred mountain
#

o

lavish hemlock
late sonnet
sacred mountain
#

lol

#

verano what essay you typing

sterile token
#

How would i calculate the $ location, knowing the location (x, y, z) from $ and a radius

########### ########### ############
########### ########### ############
##########$ ########### ############
########### ########### ############
########### #####$##### ############
########### ########### ############
########### ########### $###########
########### ########### ############

#

I know but im too much confused

#

You have told me that even 8 times

tardy delta
#

check all blocks around

#

dont ask me how

sacred mountain
tardy delta
#

probably a for loop

sterile token
lavish hemlock
#

I've just used for-loops in the past to do radius shit

sacred mountain
#

thats why it took u like 15 mins lma

lavish hemlock
#

I mean it's probably not the best solution buuut it works

tardy delta
#

i've just avoided maths

lavish hemlock
#

I don't know maths lol

sacred mountain
#

i have a method that is MathUtils#getBlocksInRadius()

#

but thats just a for loop

tardy delta
#

people writing different util classes ๐Ÿ’€

#

i just use one

sterile token
#

I have made this class but i dont know how check the location them:


public class RadiusCuboid implements Cuboid<Vector> {

    private final Vector first;
    private final Vector second;

    public RadiusCuboid(Vector location, Integer radius) {
        this.first = new Vector(location.getX() - radius, location.getY() - radius, location.getZ() - radius);
        this.second = new Vector(location.getX() + radius, location.getY() + radius, location.getZ() + radius);
    }

    public boolean contains(Vector location) {
        return null;
    }

    @Override
    public Vector getFirstPoint() { return this.first; }

    @Override
    public Vector getSecondPoint() { return this.second;}
}
sacred mountain
#

those three

tardy delta
#

i have Utils uwu

sacred mountain
#

mathutils because im stupid, Serverutils because its useful, and itemutils just cuz idk quick and easy itemstacks

#

wtf

sterile token
tropic moss
#

Hello, is there anyone who knows how to check if a block was broke without using the correct tool (BlockBreakEvent doen't work)
My plugin has to detect when a block on a specific location was broke, but BlockBreakEvent is only called if the player isn't in creative (it doesn't matter) and if player was usin correct tool(so if I break a stone with hand it doesn't cal the event and I need to)

sterile token
#

Oh sorry

#

My bad i mispell yur nick

sacred mountain
#

the amount of times i have been called that

keen obsidian
#

๐Ÿ˜ญ

dreamy chasm
#

block break with tool

plush gulch
#

How do I get a Player from a CommandSender? I want to open an Inventory for the player and that doesn't work directly?

sterile token
#

My big issue is that i dont know how check if player is inside that 2 locations i would to do?

x, y, z from first positon <= x, y, z from player vector location
x, y, z from first positon >= x, y, z from player vector location

sterile token
plush gulch
lavish hemlock
sterile token
#

Yeah of course

#

Zecken

sacred mountain
sterile token
#

People recommend what you said me, but just calculate 2 corners

sacred mountain
#

D:

sterile token
#

But i dont understand how lamo

sacred mountain
#

are you trying to find the distance between two points?

sterile token
#

People told using the block location calculate 2 corners

sterile token
quaint mantle
#

this is like the simplest math possible

sacred mountain
#

5x5 matrix

sterile token
lavish hemlock
#

Honestly I don't know how to calculate this

sterile token
#

I need to go the psicology on monday lmao

#

๐Ÿ˜‚

viral crag
#

Just do a 3 way test between the points : if between +x and -x etc

sterile token
#

But please apply what saying to my class because if not i dont understand

viral crag
#

Locating seems difficult for you this weekend

tardy delta
#

only this weekend? ๐Ÿ‘‰๐Ÿ‘ˆ๐ŸŒ

#

im rude i know lol

lavish hemlock
#

It is the way of the programmer

sterile token
#

Allright and them i just do this:

public boolean contains(Vector location) {
  return this.first.getX() <= location.getX() && this.first.getY() >= location.getY() && this.first.getZ() <= location.getZ(); 
}```
lavish hemlock
#

Probably

vast sapphire
#

I'm trying to reset lore on enchantment books when a player clicks it to display the price but this does nothing, I am using the 1.8.8 spigot api java if (e.getCurrentItem().getType().equals(Material.ENCHANTED_BOOK)) { p.updateInventory(); }

lavish hemlock
#

- is likely just a unary postfix operator that negates an integer value, so applying it on an expression should theoretically work.

sacred mountain
#

i use it in one of my methods

#

yes what

#

thanks, made it myself

#

with my supreme genius

#

SHUT UP

viral crag
#

.... vector.toLocation()

sterile token
viral crag
#

Why manually extract when you can convert

vocal cloud
lavish hemlock
#

Because Bukkit big dumbie

sterile token
#
public class RadiusCuboid implements Cuboid<Vector> {

    private final Vector first;
    private final Vector second;

    public RadiusCuboid(Vector location, Integer radius) {
        this.first = new Vector(location.getX() - radius, location.getY() + radius, location.getZ() + radius);
        this.second = new Vector(location.getX() + radius, location.getY() - radius, location.getZ() - radius);
    }

    public boolean contains(Location location) {
        return this.first.toLocation(location.getWorld()).equals(location) && this.second.toLocation(location.getWorld()).equals(location);
    }

    @Override
    public Vector getFirstPoint() { return this.first; }

    @Override
    public Vector getSecondPoint() { return this.second;}
}```
vivid cave
#

when the PlayerJoinEvent triggers, the player may still be loading ressources/world
Is there a way to know (not necessarily an event, maybe an attribute or whatever) when he's actually available (able to move, talk etc)

sterile token
sturdy heron
#

How to create+input a bitfield using ProtocolLib?

sterile token
#

Allright

viral crag
vivid cave
sterile token
#

So if i test it should be working?

quaint mantle
#

how to i check if a crafting recipe is invalid, and make it so it crafts a "garbage" item or smth

viral crag
sterile token
#

Allright thansk i will test and come again if i have sme issue. Im wondering to dont to come and being asshole again with the same thing :D

sterile token
#

It seems that my dns its not finding some urls

quaint mantle
#

yes

#

hence

#

@Nullable

vivid cave
#

nice joke tho

viral crag
vivid cave
#

yeah thats pretty much the kind of answer i expected :p

#

anyway thanks!

viral crag
#

You could request they install a client mod and get it

#

Or you could guess by ping response

vivid cave
#

yeah but the whole philosophy of my server is to implement magic stuff happening 100% vanilla

sterile token
viral crag
#

I'd say that their first move/inventory event probably means they are paying attention to the screen

#

Or, it would be reasonable to choose an average connection ping and send after that delay

vivid cave
# sterile token Most of the time its not possible

i heavily disagree;
People would instinctivly think about using texture packs when it comes to texturing, mods when it comes to new mechanisms, etc
In reality vanilla offers way more than people think (mostly thanks to packets, nms and this kind of under the hood stuff), is it the best optimised way to implement it? Probably not, but it has its magic to achieve everything vanilla only;
Here are a few achievements of mine: animated armor (multicolor customizable rainbow stuff with gradiants), gifs thanks to map (of desired image link & desired size)

vivid cave
viral crag
#

Depending what you are sending, it would sort of say what's acceptable

sacred mountain
#

nice and readable stacktrace

lost matrix
viral crag
#

You have a super lobby issue?

lost matrix
#

Your yml formatting is fked. Just fix the files and you are good to go.
*PS: I think its your lists

sacred mountain
#

whyd he delete evertyhitng

keen birch
#

Cause i found the error

#

i just need to put a '

#

xd

grim ice
#

im bored

sacred mountain
#

click the buttons in my profile tho

#

fun

#

lmaooooooo

grim ice
#

Damn how did u know it

viral crag
#

Verano interpreter

grim ice
#

but its not spelled like that

#

its

#

"give me a lib idea"

sacred mountain
#

gib lib idea

grim ice
sacred mountain
grim ice
#

its the one with no ads

#

iirc

sacred mountain
#

bruh how u remmeber

#

i cant remember what i had for breakfast

grim ice
#

lol

#

starts with xvF

sacred mountain
#

i dont

#

which is why my code is shit

grim ice
#

would we live without autocomplete btw

sacred mountain
sterile token
#

Input (before cuboid):

location: x=230, y=79, z=258
radius:: 5

Otuput (after cuboid)

First corner: x=226, y=83, z=262
Second corner: x=234, y=75, z=254

My issue here is that contains its returning false when im inside the radius

#

The corners are correct

sacred mountain
#

wat

#

e

lavish hemlock
#

What kind of fucking atrocious code is this

lost matrix
#

Use BoundingBox from Spigot @sterile token

sacred mountain
#

lmoa

lavish hemlock
#

...

sterile token
grim ice
#

wew

tardy delta
lavish hemlock
#

Okay y'know I know about the whole double bracket trick with maps buuuut this is literally not valid

grim ice
sacred mountain
#

i wrote it on my phone i dont even know if it works

#

pls

tardy delta
#

catching npe's lol

sterile token
tardy delta
#

uhm new List<string> {"mc", "java"} isnt java

sterile token
grim ice
#

also having a list of hobbies doesnt make sense to me
Set<String> hobbies = Sets.newHashSet("Minecraft", "Java");
(guava is awesome)

sacred mountain
#

so

#

when i dont have an ide

lavish hemlock
#

Time to fix that for you

public class MyProfile {
    var name = "clonkc";
    var hobbies = List.of("Minecraft", "Java");
}
tardy delta
#

you could use Arrays.asList or new ArrayList<>(Arrays.asList)

tardy delta
#

List.of uwu

#

never used it even if im using java 16

lavish hemlock
#

List.of is actually a good idea since it's immutable and, surprisingly, takes less time to construct than Arrays.asList

sacred mountain
#

didnt know list of existed

lavish hemlock
tardy delta
#

does List.of has the same mutability as Arrays.asList, so not allowing the list to be expended or decreased in size?

lavish hemlock
#

No

#

List.of literally cannot be mutated

#

at all

grim ice
sacred mountain
#

how do i get my plugin instacnce properly in a static method

lavish hemlock
#

If you need to change the list, just change the code :)

grim ice
#

that sucks for you man, imagine having one never changing list of hobbies

tardy delta
sharp bough
#

how does the chunk generation work? i currently have

for (int x = 0; x < 16; x++) {
            for (int z = 0; z < 16; z++) {

                if (x < 2){
                    chunk.setBlock(x, 1, z, Material.DIAMOND_BLOCK);
                } else if (z < 2) {
                    chunk.setBlock(x, 2, z, Material.GOLD_BLOCK);
                } else {
                    chunk.setBlock(x, 0, z, Material.STONE);
                }
            }
        }

wich creates the image but i dont full understand how it wokrs

lavish hemlock
#

Arrays.asList allows you to set

grim ice
#

I would want to get a new hobby whenever I want without changing my code core

ivory sleet
#

Ye list of is nice altho breaks liskovโ€™s substitutability

grim ice
#

Sets.newHashSet(E...); for the win

#

i dont get why would u want an ordered

tardy delta
grim ice
#

collection for hobbies

sterile token
#

@ivory sleet please can u help im too stressed lmao idk what happening

tardy delta
#

that doesnt expand the list right?

ivory sleet
#

?Howtoask no

#

?ask

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!

ivory sleet
#

Oh thatโ€™s the one

sacred mountain
#

lo

#

l

lavish hemlock
#

List.of(...) is basically a faster equivalent to Collections.unmodifiableList(Arrays.asList(...))

grim ice
#

Best choice imo

tardy delta
#

ahh

lavish hemlock
#

Set is sometimes slower than List

grim ice
lavish hemlock
#

Also Sets requires you to import Guava

#

Which, if you're developing a library, is a bad decision

grim ice
#

Yeah and

lavish hemlock
#

Libraries should almost always be zero-dependency

tardy delta
#

and what's again the difference between Collections.unmodifiableList and ImmutableList.copyOf?

lavish hemlock
tardy delta
#

i heard that one of them is providing a view

ivory sleet
#

Former gives an immutable view

grim ice
lavish hemlock
#

Also Guava's immutable implementation is faster

ivory sleet
#

Latter gives a totally immutable instance

tardy delta
#

and i guess a view is an equivalent of new ArrayList<>(originalList)?

sharp bough
lavish hemlock
tardy delta
#

whats a view then

grim ice
lavish hemlock
#

Yeah

tardy delta
#

mye

sacred mountain
#

whats wrong with static abuse

lavish hemlock
#

A view would be an adapter

sacred mountain
#

can someone explain

sterile token
# ivory sleet Oh thatโ€™s the one

Im using this class and i too assole trying to do contains method to check if given location its inside the the 2 corners (first and second)

public class RadiusCuboid implements Cuboid<Vector> {

    private final Vector first;
    private final Vector second;

    public RadiusCuboid(Vector location, Integer radius) {
        this.first = new Vector(location.getX() - radius, location.getY() + radius, location.getZ() + radius);
        this.second = new Vector(location.getX() + radius, location.getY() - radius, location.getZ() - radius);
    }

    public boolean contains(Vector location) {
        return null;
    }

    @Override
    public Vector getFirstPoint() { return this.first; }

    @Override
    public Vector getSecondPoint() { return this.second;}
}```
ivory sleet
#

A view basically ensures all manipulations done on the view gets reflected on the actual instance

sacred mountain
#

and what is static abuse

ivory sleet
#

Using static unnecessarily

grim ice
ivory sleet
#

Which to some extent can be subjective but ye

lavish hemlock
ivory sleet
#

๐Ÿฅฒ

tardy delta
#

wha-

tardy delta
sacred mountain
#

my methods are all static ๐Ÿ‘€

lavish hemlock
#

Yeah but you'd have to reflect it

sterile token
#

Oh please lmao even 3 days, im not shocking tomorrow i will go to the phiscogy because im sto stressed since doing this fucked shit with vectors and that shity things

#

Idk why spigot wasnt made multi version ๐Ÿ˜ก

lavish hemlock
#

Bukkit exists so there's an API that works cross-version

lavish hemlock
#

But the problem is that the API doesn't work cross-version

grim ice
#

it feels cringe to make a library just for legacy versions

lavish hemlock
#

Since โœจ binary incompatibilities

tranquil viper
#

how do I compare two inventorys to see if they're the same without checking the names?

grim ice
#

@tranquil viper hi skyblock player

tranquil viper
#

Hey

sterile token
sacred mountain
#

skyblock is boring

lavish hemlock
tranquil viper
sacred mountain
#

300 mil in my purse but idk what to do with it

lavish hemlock
#

Then compare them referentially by ==