#help-development

1 messages · Page 235 of 1

spark pagoda
#

the hard part is letting your friend join without connecting them to your home network

slim igloo
#

we can skip that then, I just want to make a server to test out my plugin i coded

#

how should I go about that?

#

i appreciate each of your responses btw

spark pagoda
#

the best way is to use a plugin for your build tool, but for now you can just add your plugin to a normal server and join it using the ip ::1

fresh timber
#

is there a way to check if a command argument can be parsed into an int without outputting a ton of exceptions?

wet breach
#

this is mainly due to the fact that modern cpus have tricks to speed up such things. Whenever the JVM can, it will invoke native code which sometimes will invoke known cpu extensions

spark pagoda
spark pagoda
spark pagoda
#

i think i've actually seen that before !! it was on a stackoverflow post for the bit permutations

#

thank you though, i'll have to bookmark it this time :)

wheat inlet
#

Do I need to load a chunk to get the chunksnapshot

#

I dont really understand how they work

wet breach
#

I believe the method to get the chunksnapshot automatically loads the chunk

#

can't really get a snapshot of something the server doesn't have loaded

#

its like asking can you look at a picture of nothing

fresh timber
#

I'm trying to create a player_ec table with 7 strings: 1 uuid and 6 ec that are using base64 to convert them, but I'm getting an error. Here is the statement I'm trying to use and the image is the error.

String sql2 = "CREATE TABLE IF NOT EXISTS player_ec(uuid varchar(36) primary key, firstec str, secondec str, thirdec str, fourthec str, fifthec str, sixthec str)";

(I have also tried for all of the strings, using string instead of str)

eternal night
#

wtf is a str

fresh timber
#

bro idk I was trying different things to see if they would work instead of string

#

but didnt work

#

I did try string btw xd

eternal night
#

I mean

#

str is just not a datatype in any of the SQL implementations I know

fresh timber
#

ok ok I didnt know'

eternal night
#

what do you want to store in there ?

fresh timber
#

STRING

#

it didnt work when I tried string tho

eternal night
#
fresh timber
#

string did not work :(

#

oh

#

;-;

#

I have to say the size??

eternal night
#

read below that 😅

#

well not really

fresh timber
#

idk the size xd

eternal night
#

TINYTEXT would hold up to 255 chars

fresh timber
#

oh ok ima use mediumtext cus idk how big it is

eternal night
#

this is just a choice of what datatype

#

yea mediumtext should contain pretty much whatever

fresh timber
#

ye its prob pretty big if it stores a whole inv in one string

wet breach
#

ideally you should be using the smallest type necessary

eternal night
#

👀

#

MEDIUMTEXT might be a bit large for a base64 inv

#

plain TEXT should probably workout

#

or just MEDIUMBLOB if you have the bytes

fresh timber
#

ye but text wants a size

eternal night
#

nah

fresh timber
#

idk the size xd

eternal night
#

you can just not specify it

fresh timber
#

ahh ok

eternal night
#

goes up to 65,535 bytes

fresh timber
#

so just TEXT or TEXT()?

eternal night
#

just TEXT

#

tho I presume

#

urgh

#

probably MEDIUMTEXt

#

just for those fuckers that have 50 shulkers

#

with stuff inside

fresh timber
#

ok xd

#

I always am confused why every mysql statement ppl write is all caps even tho it doesnt need to be

#

not all but mostly

eternal night
#

I mean, conventions be conventions

wet breach
#

store it as a BLOB

fresh timber
#

;-;

#

I just set all to mediumtext

#

why tho?

eternal night
#

BLOB is certainly to small form some inventories

#

from personal experience kekw

wet breach
#

BLOB can store 65,535 bytes

eternal night
#

indeed

#

you'd be surprised what one can do with shulkers and books

fresh timber
#

xD

#

cant u make those like chunk ban machines with that same combination

eternal night
#

indeed

fresh timber
#

lag out server xd

wet breach
#

if you convert to base64 and then grab the bytes, I doubt you will exceed the limit for BLOB

#

but if you really want more room go with mediumblob, you can store 16mb worth of binary data with that

#

which is actually quite a lot

eternal night
#

yea mediumtext or mediumblob is my recommendation too

wet breach
#

I wouldn't store it as text mainly because in terms of space for DB text takes up more

eternal night
#

Yea, blob is cool if you can

#

idk they specifically asked for text

wet breach
#

well they are also new

eternal night
#

true dat

wet breach
#

and don't know about these things yet 🙂

#

which is why I wanted to see their code for sql

#

because odds are they are doing some other things wrong

#

or not the appropriate way anyways

ancient plank
#

Like me when I do sql

wheat inlet
#

I tried using the Chunksnapshot thingy and it works not too well,
I need to teleport my player on a solid block and air above that
cs is a ChunkSnapshot

if( cs.getBlockType(x, y, z).equals(Material.AIR)) ) //doesnt work
if( cs.getBlockType(x, y, z).isSolid() )       //doesnt work
#

my plugin works if I use the world.getBlock command

humble tulip
#

why are you using chunk snapshots?

#

are you working async?

wheat inlet
#

cause the World.getBlock could cause performance issues

delicate lynx
#

cs.getBlockType(x, y, z).isAir()?

humble tulip
#

yes but getting a chunk and snapshotting it does the same thing

#

the reason World#getBlock causes issues is cuz you need to load the chunk for that iirc

#

But you also load the chunk to snapshot it

wheat inlet
#

I am new to all of this I tried snapshots for the firsttime and hoped that the isSolid would work

humble tulip
#

What are you trying to do?

#

find a random spot for a player?

wheat inlet
#

yess

#

but with nether its annoying because getting the maxheight is always the bedrockroof

humble tulip
#

ahh

#

well you need to first look for air

#

send what you have thus far

#

the entire thing

#

?paste

undone axleBOT
wheat inlet
#

I have it working without snapshots

humble tulip
#

oh...

wheat inlet
humble tulip
#

you sure you tried it enough without snapshots to say for sure it works without?

wheat inlet
humble tulip
#

what's this

#
        int cx = ((x % 16 + 16) % 16);
        int cz = ((z % 16 + 16) % 16);
wheat inlet
#

its getting the chunk coordinates

humble tulip
#

why are you doing x%16 + 16? and then %16?

#

x and z are your chunk coordinates

wheat inlet
#

because with (x % 16) you can get negative modulo so i add 16 and mod again

humble tulip
#

huhh??

#

but why?

wheat inlet
#

if (-18 % 16) = -2

humble tulip
#

why are you getting the modulo for a chunk x

#

World X / 16 = chunk x

#

you already generated a chunk x

#
        ChunkSnapshot c = world.getChunkAt(x, z).getChunkSnapshot();
        //Chunkcoordinates
        int cx = ((x % 16 + 16) % 16);
        int cz = ((z % 16 + 16) % 16);
wheat inlet
#

because c.getBlockType(cx, y, cz) expects 0-15 for x and z

wet breach
humble tulip
#

so use a for loop and loop from 0-15

humble tulip
wet breach
#

what that would do is return the remainder

wheat inlet
#

I dont understand you I think you are wrong

humble tulip
#

yh my bad

#

I am not

wheat inlet
#

why would I loop from 0-15

wet breach
#

it needs to be floor(x/16)

humble tulip
#

imagine world height was 1

#

not 256

#

so we're just dealing with x and z

wheat inlet
#

yes

humble tulip
#

and let's say we're looking for an air block

#

say air block is at 14,2

wheat inlet
#

yes I am listening

humble tulip
#

we need to do

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

and check each x and z combination for air

wheat inlet
#

sure

humble tulip
#
        x = rand.nextInt((rangeMax - rangeMin) + 1) + rangeMin;
        z = rand.nextInt((rangeMax - rangeMin) + 1) + rangeMin;

        World world = Bukkit.getWorld(worldname);

        ChunkSnapshot c = world.getChunkAt(x, z).getChunkSnapshot();
        //Chunkcoordinates
        int cx = ((x % 16 + 16) % 16);
        int cz = ((z % 16 + 16) % 16);
        p.sendMessage("x: "+ x +" cx: "+ cx + " z: "+ z + " cz: " + cz);
        for(y = 105; y > 30; y--){
            if(c.getBlockType(cx, y, cz).isAir() ){
                if(c.getBlockType(cx, (y-1) , cz).isAir()){
                    if (c.getBlockType(cx, (y-2), cz).isSolid()) {
                        Location loc = new Location(world, x, (y-1), z).add(0.5, 0.5, 0.5);
                        p.sendMessage("You will be send to: "+ x +" "+ y + " "+ z);
                        return (loc);
                    }
                }
            }
        }
#

what you do here is get a random chunk and snapshot it

#

let's assume its Chunk(4,3)

#

which would have an origin at (64,0,48)

#

you then calculate cx and cz which according to your code is 4 and 3

#

that means you're only checking one row of blocks in the chunk

#

since youre getting the block at (cx, y, cz)

#

cx and cz are fixed

#

you need to check all x and z values in the chunk

#

?paste

undone axleBOT
humble tulip
#

i fixed your code

#

see if that works

wheat inlet
#

k thank you I will look if it helps me

#

I am not sure if you understood what I was trying to do

#
I am getting a random x and z coordinate
Snapshotting the Chunk in which those coordinates are
finding out which chunkcoordinates in the chunk represent x and z (cx: x in chunk c)
Iterating from the roof downwards to find a solid block with enough space
#

I was never trying to find an empty block in the chunk , I was just trying to find an empty block at exactly that one coordinate(x,z)

humble tulip
#

why are you doing step 3?

wheat inlet
#

I was trying to implement getmaxHeightYAt for the nether

humble tulip
#

ohh

#

netherrandomLocation

#

that's your method name hence the confusion

wheat inlet
#

oh sorry

#

I am bad ast explaining my bad I guess

humble tulip
#

also you're generating a random location

humble tulip
wheat inlet
#

well idk Its my first plugin

wet breach
wheat inlet
wet breach
#

there is more empty blocks between the ground and height ceiling which is now at 256

humble tulip
wet breach
#

then there is between the ground and 0

wet breach
wheat inlet
#

frostalf true I might change that I wouldnt be getting the heighest block but its not really what i cared about

#

uhm what my main problem was that the ChunkSnapshot seem unusable cause the isSolid() doesnt work with them

wet breach
hard ether
#

I've looked everywhere. Is there a way to give an entity the texture & AI of a mob already in the game?

wet breach
#

you would have to use NMS and custom entity

hard ether
#

ah, okay.

hard ether
wheat inlet
#

Thanks to everyone for the help even tho I was saying confusing shit

wet breach
#

the easiest method might be to use packets most likely

#

I mean if you don't need custom AI and stuff, you could just spawn the entity you want the AI of

#

and then use packets to disguise it as some other entity

sterile token
wet breach
harsh badge
#

I'm getting this error when trying to build: Could not resolve org.spigotmcspigot1.8.8-R0.1-SNAPSHOT. could anyone help?

jagged monolith
#

Means you properly didn't add the api correctly.

#

Show your build file

harsh badge
#

Should I send the whole build file?

jagged monolith
#

?paste

undone axleBOT
harsh badge
jagged monolith
# harsh badge https://paste.md-5.net/cesuhotozi.cs

Try
compileOnly 'org.spigotmc:spigot-api:1.8.8-R0.1-SNAPSHOT'

maven { url 'https://oss.sonatype.org/content/repositories/snapshots' }
maven { url 'https://hub.spigotmc.org/nexus/content/repositories/snapshots/' }

harsh badge
#

I should put that in dependencies instead of the CompileOnly?

#

Or I should put it outside of it?

jagged monolith
#
maven { url 'https://oss.sonatype.org/content/repositories/snapshots' }
maven { url 'https://hub.spigotmc.org/nexus/content/repositories/snapshots/' }

An they just go under the other maven one you have.

harsh badge
#

Thank you, that fixed that error but now I'm getting an error with my import net.minecraft.server.v1_8_R3.Tuple;

jagged monolith
#

An what's the error?

harsh badge
#

All my imports with net.minecraft.server.v1_8_R3 are no longer working, error: package net.minecraft.server.v1_8_R3 does not exist

jagged monolith
#

Hmm try removing the -api from spigot-api

#

I think spigot-api is for the newer versions

harsh badge
#

I'm getting the same issues as earlier, could something be wrong with my pom? I am using code a developer sent me could that be an issue too?

jagged monolith
#

Have you ran buildtools for 1.8.8 on your pc yet?

harsh badge
#

I haven't

#

How do I do that?

#

I can put java -jar BuildTools.jar --rev 1.8.8 in the cmd?

jagged monolith
wet breach
#

did mojang ever fix the link with 1.8.8 vanilla server jar?

#

if not you are not going to be able to build the 1.8 version

#

at least not with buildtools anyways

harsh badge
#

I am trying to run the command but it's saying it's unable to access BuildTools.jar

jagged monolith
#

Are you running the command in the directory from where you download the buildtools jar to

harsh badge
#

I just did that and now it says my Java version is to high. Do i need to goto Java 8 in order to do this? If so how can I switch back?

jagged monolith
#

What Java version are you running?

harsh badge
#

11

jagged monolith
#

11 should work, but may need java 8

wet breach
#

you need java 8 for mc 1.8

#

for compiling only

jagged monolith
#

Makes sense lol

wet breach
#

has to do with the decompiling process

wet breach
jagged monolith
#

No idea. I haven't dealt with 1.8 in years.

wet breach
#

same, but anyways the link for downloading 1.8 either got removed or restricted

#

if they have not fixed it, then you can't use buildtools to get 1.8

#

need the vanilla server jar first for buildtools to work lol

#

well buildtools fetches it, but its one of the first things it does

jagged monolith
#

I'd test it but can't be bothered reverting my java haha

harsh badge
# jagged monolith https://www.spigotmc.org/wiki/buildtools/#running-buildtools Download the Buildt...

I get this error: Error compiling Spigot. Please check the wiki for FAQs.
If this does not resolve your issue then please pastebin the entire BuildTools.log.txt file when seeking support.
java.lang.RuntimeException: Error running command, return status !=0: [bash, applyPatches.sh]
at org.spigotmc.builder.Builder.runProcess0(Builder.java:976)
at org.spigotmc.builder.Builder.runProcess(Builder.java:907)
at org.spigotmc.builder.Builder.main(Builder.java:706)
at org.spigotmc.builder.Bootstrap.main(Bootstrap.java:27)

#

It took me a minute to revert back to older java versions

jagged monolith
#

You on linux or Windows

harsh badge
#

Windows

fervent chasm
#

Is there a way to remove the name of an item? I've tried setting it to null and to just "", but it just reverts it back to it's vanilla name.

wet breach
#

not just the error

harsh badge
# wet breach show the full log

Is this enough: Picked up _JAVA_OPTIONS: -Djdk.net.URLClassPath.disableClassPathURLCheck=true
applyPatches.sh: line 2: $'\r': command not found
Rebuilding Forked projects....
applyPatches.sh: line 6: $'\r': command not found
applyPatches.sh: line 7: syntax error near unexpected token $'{\r'' applyPatches.sh: line 7: function applyPatch {
'
Error compiling Spigot. Please check the wiki for FAQs.
If this does not resolve your issue then please pastebin the entire BuildTools.log.txt file when seeking support.
java.lang.RuntimeException: Error running command, return status !=0: [bash, applyPatches.sh]
at org.spigotmc.builder.Builder.runProcess0(Builder.java:976)
at org.spigotmc.builder.Builder.runProcess(Builder.java:907)
at org.spigotmc.builder.Builder.main(Builder.java:706)
at org.spigotmc.builder.Bootstrap.main(Bootstrap.java:27)

undone axleBOT
jagged monolith
#

The Full Log

harsh badge
#

is this enough? If not I'll copy everything

harsh badge
wet breach
harsh badge
#

Deleting everything?

wet breach
#

also are you using command prompt or gitbash?

harsh badge
#

I used java -jar BuildTools.jar --rev 1.8.8

#

Where should I delete everything?

wet breach
#

ok but where did you use that

#

in command prompt?

harsh badge
#

Yes

wet breach
#

that is your problem right there

#

use gitbash instead

#

right click in the directory you have buildtools

#

select open gitbash

#

then run that command again

#

it should work this time

harsh badge
#

My gitbash is java 11

#

I need to switch this too?

jagged monolith
#

Yeah you'll need to for compiling 1.8.8

sterile token
#

that why i have 2 env vars

#

so i just either run java8 or java17 depending what i need to compile

harsh badge
#

How do I switch my gitbash version?

#

My terminal java is 8 but my gitbash is 11

harsh badge
#

I think I just need to run as admin trying again

buoyant viper
#

yeah, looks like 1.8.8 is dead?

jagged monolith
#

YEah, it's still broken by the looks of it

hushed pawn
#

how to spawn someone right infront of player ?

#

in 1 block distance

#

how to calculate that location?

humble tulip
#

Wrong

humble tulip
vocal cloud
#

Man that code could be really shortened lol

#

I'd do that first then worry about bugs or issues

rough drift
#

Okay I got my project almost compiling! It's just that the specialsource-maven-plugin throws this: Failed to execute goal net.md-5:specialsource-maven-plugin:1.2.4:remap (remap-obf) on project nms-library: Error creating remapped jar: Unsupported class file major version 63 -> [Help 1]

#

Basically it doesn't support java19

vocal cloud
#

rekt

rough drift
#

fr

vocal cloud
#

use 17

rough drift
#

doesn't 1.19 use 19?

vocal cloud
#

probably not as it's not LTS

rough drift
#

frick

#

I wanted the new features

vocal cloud
#

correct

rough drift
#

you can just use an array

#
ItemStack[] stacks = new ItemStack { ... };

stacks[e.getSlot()];
vocal cloud
#

I already said that lmfao

rough drift
#

two points

#

why are you creating a new ArrayList just to wrap an ArrayList?

#

why are you assigning it to an ArrayList<ItemStack> when you can simply use List<ItemStack>

#

and also fyi you have two ;

glad prawn
#

new new new new new new new

wet breach
rough drift
#

^

#

yep

#

it literally makes a new one

#

you should always use the weaker type if possible

#

even in method params/variables

#
ArrayList<MyThing> things; // bad, List<MyThing> can't be assigned
List<MyThing> things; // good, both List<MyThing> and ArrayList<MyThing> can be assigned
wet breach
#

and then they can do items.add(ItemStack)

#

or whatever it is they require

kindred valley
#

Artifact sorting is a bit problem on intellij

#

As an example, Vault API just uploads 1 more spigot api(1.13) when it is not able to detect the original version of spigot because it is not a more prioritied artifact than spigot so it always uses the 1.13 spigot. Its like hell.

#

Nvm you got the point

#

Be careful

hazy parrot
#

You can always exclude ig

#

Intellij has cool maven conflict thingy

fierce whale
#

Is there anyway to give permission to player?

jagged monolith
#

It's easier to use a permission plugins api. Like LuckpermsAPI if you're wanting to give permissions through code.

wet breach
#

artifact priority is controlled first by the order the dependencies are listed

#

second, you can exclude transitive dependencies

kindred valley
#

Check here

jolly crypt
#
    for (let i=1;i<7;i++) {
        const countDiceBonus = posible1tm6[i-1].innerHTML
        totalDiceValueBonus.push(number(countDiceBonus))    <-----  adding 'number()' solved it
    }
    console.log(totalDiceValueBonus)  
    console.log(totalDiceValueBonus.reduce((accumulator, currentValue) => accumulator + currentValue, initialValueTEST));
    }

Output:

(6) ['4', '2', '0', '0', '0', '0']
0420000

I expected totalDiceValueBonus.reduce to give me 6 for this instance, what am I doing wrong?

hazy parrot
#

it sums the chars i would assume

#

i dont know js, but you would have to parse it somehow ig

jolly crypt
#

I found it

#

the 'numbers' in the array were strings and no numbers

#

thanks anyway

hazy parrot
#

it sums the chars i would assume

#

¯_(ツ)_/¯

glossy venture
#

its called an ArrayList but its not the same type as java.util.ArrayList

#

its literally an immutable list which wraps an array

delicate narwhal
#

does somebody know how i can turn on tnt duper on spigot servers???

quiet ice
#

Spigot normally doesn't disable dupes

delicate narwhal
#

WHAT

#

WHY

tardy delta
#

Arrays.asList doesnt create a normal arraylist

glossy venture
#

yeah

quiet ice
#

Paper on the other hand - they disable dupes - but if the dupe does not exist on spigot and especially not in vanilla then there is no chance that it will be a toggleable thing unless you use another fork entirely that specialises in allowing dupes

sinful wave
#

I'm making a duels plugin, and currently I have a void world where I add arenas and teleport players there.
What would be the best way to paste in arenas to the void world? The WorldEdit API? It seems to use quite alot of performance.

glossy venture
#

then you just have to load them

sinful wave
#

but i wont

glossy venture
#

yeah

#

you could add in a grid system

sinful wave
#

ye

#

i could just have lines for each

glossy venture
#

which dynamically pastes arenas if you need more

sinful wave
#

and extend the lines

#

how would i do that tho, i'd have a preset world

#

and replace the world with the preset world

#

everytime the server starts

glossy venture
# sinful wave and replace the world with the preset world
public static final int GRID_CELL_W = 240; // x
public static final int GRID_CELL_H = 240; // z

public static final int INIT_GRID_SIZE = 20; // 20 x 20

public void setupWorld(World w) {
  for (int xi = 0; i < INIT_GRID_SIZE; xi++) {
    int xc = xi * GRID_CELL_W; // x coord
    for (int zi = 0; i < INIT_GRID_SIZE; zi++) {
      int zc = zi * GRID_CELL_H; // z coord

      pasteArena(w, xc, zc);
    }
  }
}
#

maybe smth like this

#

you could do this asynchronously i think

#

to not slow down the server start too much

sinful wave
#

nah i could just have a preset world tho?

glossy venture
#

true

sinful wave
#

like make one

#

also

#

unrelated but kinda related

#

once i tp two players into an arena

#

and the match statrs

#

say its uhc and they have blocks

#

i want them to be able to place and break blocks

#

but not pre existing blocks

#

how would smth like that look

glossy venture
#

keep a set of placed blocks

sinful wave
#

my idea was

#

to listen to block break and place events

glossy venture
#

and dont allow removal if it is not in that set

sinful wave
#

whenever they place a block

#

keep it in a

#

set

#

and

#

whenever they break

#

check if its in that set

#

and if it is allow

glossy venture
#

yeah thats what im saying

sinful wave
#

if it isnt cancel

#

ok cool

flint coyote
#

You store which blocks were placed and check if the broken block is stored in the block break event. You can also use that set to clean up the arena after the round ended, ya

glossy venture
#

and then to reset the arena

#

just remove all those blocks

#

i guess

#

or re-copy a schematic but that would require the admins to put schems of each arena too

sinful wave
#

schematic seems heavy on performance

#

especially if multiple matches are being started at once

#

since im just hosting this as a little project

#

i want it to be pr light

harsh badge
#

I'm in intellij and I'm having a problem with my local imports (trying to import something from one file while i'm working on another in the same folder)

tardy delta
#

heh show me

harsh badge
#

I can't send pictures

tardy delta
#

uh you can verify or use some paste service thing

harsh badge
#

?paste

undone axleBOT
tardy delta
#

uh that wont work fir images

#

just send in dm

remote swallow
#

?img

undone axleBOT
tardy delta
#

did you change your path or smth?

echo granite
harsh badge
#

I don't think so

echo granite
ivory sleet
harsh badge
blazing flare
#

What's generally considered the better way to create inventories? I've seen the use of an inventory holder, or a map of player names and the inventory. Is there a reason to use one over the other?

tardy delta
#

wdym by a map of player names and the inventory

echo granite
#

it's a pain in the ass to manually write constructors all the time

ivory sleet
#

Sounds like a design issue moreover

#

You should split your components up into smaller parts, use builders etc

echo granite
#

which I of course do

#

but it becomes a pain in the ass once the project is large enough

#

example:

ivory sleet
#

Cause if a component itself depends on a lot of other components arguably that component is relying on too much external

#

Ik what you mean

echo granite
tardy delta
#

my inventory framework is designed as a Map<Inventory, InventoryGui> and the latter handles all clicks and optionally keeps track of all the viewers

echo granite
#

I'm starting to have more than 10 services, which SRP likes but I don't xd

ivory sleet
#

Thats the thing, right now it looks like you send your highest level components down to the lowest level ones in one go

blazing flare
tardy delta
#

uh no idea why you would do that

#

Map::get would be a pain in the ass then anyways

tardy delta
#

hmm anyways is exposing iterators over collections considered good practice or are there better alternatives?

echo granite
#
public Set<User> getUsers()
{
    return new HashSet<>(this.users);
}```
#

it's also the recommended way by Effective Java

echo basalt
#

Collections.immutableCopy

#

type deal

tardy delta
#

hmm i started using iterators because i just needed to iterate over it

echo granite
echo basalt
#

contains checks aren't suitable on iterators

tardy delta
#

if i dont need them

echo basalt
echo granite
echo basalt
#

the end user just assumes it's the original collection

tardy delta
#

Collections.unmodifiableX

echo basalt
#

^

echo granite
#

also that should be specified in the docs if it's mutable or not

echo basalt
tardy delta
#

imagine having docs lmao

echo granite
#

what's wrong with that?

#

it's just the code on the user's end that suddenly became less ugly

echo basalt
#

it doesn't

echo granite
echo basalt
#

Set<Whatever> set = Collections.unmodifiableSet(original)

tardy delta
#

👀

echo basalt
#

it's still the same

echo granite
#

?

echo granite
#

how is it the same?

tardy delta
#

and it backs the list you want to expose right?

echo basalt
#

the contents and order is the same

#

like

#

it's just a wrapper

echo granite
echo basalt
#

iirc

tardy delta
#

so whenever i add something to the orginal its wrapper is aware of it too

echo granite
#

which is ugly

tardy delta
#

hmm

#

just dont modify it lol

ivory sleet
#

The problem with returning an immutable copy is that it might be overlooked by the consumer, unless you annotate with @Unmodifiable or something

tardy delta
#

thats what i usually try to do but always forget lol

echo basalt
#

You can just make it return an immutableset

#

and still just use the Set<whatever>

#

so like

ivory sleet
#

Yes but that breaks the contract of the method to some extent

echo basalt
#

hmm

ivory sleet
#

Basically violating liskovs substitution principle

echo granite
#

Basically Collections#unmodifiableX methods should have never been added

ivory sleet
#

Myeah Idk any longer whats best tbh

#

I mean it has its usecases

#

But nowadays Set::copyOf and ::of as well as Map::of and ::copyOf exist

tardy delta
#

probably slower to create than a unmodifiable wrapper

ivory sleet
#

A bit myeah

echo granite
tardy delta
#

assuming you want to alter the collection it could be useful ig

ivory sleet
#

Well command classes are low level

#

They are just some implementations of HOW your command interface works

#

And these services sound like quite high level

echo granite
#

I don't understand what's wrong?

ivory sleet
#

You should have one or more middle layers that reduce the amount of dependencies and simplify the contact between the high level ones and the low level ones

alpine cairn
#

Is it bad that I have no idea what y’all are talking about

echo granite
ivory sleet
#

well if you go on to do it in an enterprise way, (which I assume you wanted to do since you use guice)

#

?

#

SRP means that one a class must only have one major reason to change

#

You don’t have to get rid of them

echo granite
#

it means the class only serves one purpose

ivory sleet
#

Yes thats the definition

#

Not really

ivory sleet
echo granite
#

okay, how would you refactor the code to reduce the amount of dependencies?

#

because it's a boilerplate nightmare once you have more than 5 in a class

ivory sleet
#

No not refactor, but instead create an internal api for your low level components

#

So they dont directly talk to the highest level ones

echo granite
#

can you maybe send a uml example? I really have no idea how to implement that(not technically but in my imagination)

ivory sleet
#

Myeah I can

#

I can create one when im on my pc

tardy delta
#

hehe typing on phone again

quiet ice
#

Plus the thread-safety aspect shouldn't be completely ignored when working with a desync-on-write/lazy-copy collection

echo granite
tardy delta
#

just wanted to say that thats two ticks but i dont think mc has collections with over a millions elements smh

echo granite
#

lol

quiet ice
#

Differences compound. totalTime = singleTime * count. Inadvertently copying a million object long array once is no big deal. Copying it a few million times? No dice.

echo granite
quiet ice
#

Sometimes it is easier to just optimize the collection than to optimize the consumer

#

I know this sounds far-fetched so let's give an example:

  • Claiming plugin A maps each block to a claim. This is stored in a glorified Map<Location, Claim>
  • As you can imagine that map is going to have millions of entries
  • Plugin B wishes to render all the claims to an image.
  • Plugin B may under no circumstance change that map directly as it would break quite a lot of things
harsh badge
#

I'm gettgin package org.bukkit does not exist when I try to build my jar anyone have an idea?

quiet ice
#

If you were to copy the list even once you essentially retrieve something from the collection twice. You can optimize it by listening for changes and all that but in the end you'll have two different collections that have exactly the same contents.

#

However If you were to just provide an immutable collection that pass-throughs to the internal list it would go much quicker.

harsh badge
#

i'm trying to use maven package

quiet ice
#

So you are using maven and no other build tool (such as Eclipse's export menu or whatever IntelliJ's pendant is)?

harsh badge
#

I'm going into intellij running maven package is there another way I should do this?

eternal oxide
#

using artifacts or the right hand maven menu?

tardy delta
#

same thing

#

i just added it as a run configuration

harsh badge
#

I tried looking into my gradle to see if it was missing anything but It works just fine unless I am trying to download it

tardy delta
#

wait are you using maven or gradle now

harsh badge
#

I'm now getting build errors as well java: package com.sk89q.worldedit does not exist

remote swallow
#

Maven or gradle though

harsh badge
#

i started getting errors when I tried doing my mvn package

tardy delta
#

why combing maven with gradle 🤔

harsh badge
#

So I should delete my gradle file?

tardy delta
#

idk what you wanna use lol

harsh badge
#

I can delete my maven how would I do it with gradle to build to jar?

fresh timber
#

I have a method that takes in an inventory. I want to get the title of the inventory but I literally cannot seem to be able to do it. Does anyone know how I can get the title of this Inventory object?

tardy delta
#

idk how gradle works

remote swallow
#

Ctrl crtl twice then type gradlew build

fresh timber
#

nah I tried that

dusk flicker
#

what have you tried, and what was the outcome

#

?jd

tardy delta
#

or was it InventoryHolder#getTitle

quiet ice
#

InventoryView

fresh timber
#

I tried inventory.getType().getname didnt work, I have tried.getname doesnt exist, I have tried.getViewers().get(0).getOpenInventory().getTitle()

quiet ice
#

InventoryHolder is roughly equivalent to player (exact implementor depends on the circumstances)

fresh timber
#

I have tried inventory.getview.gettitle

tardy delta
#

hmm thought that

dusk flicker
#

Can you upload that class to a paste?

#

?paste

undone axleBOT
harsh badge
echo basalt
#

the true question

#

is why are you trying to get the title

dusk flicker
#

yeah

echo basalt
#

because there's no true reason

#

unless you're doing some extremely fancy stuff

#

but even then

remote swallow
echo basalt
#

there's probably a better way

fresh timber
#

so in my base64 I can put a title at the end and then take the title out when I use frombase64 because for some reason the method I got doesnt save the inventory name

echo basalt
#

mans tryna store a whole inv in base64

fresh timber
#

;-;

tardy delta
#

whats the reason youre saving an inv anyways

fresh timber
#

oh xd

tardy delta
dusk flicker
#

lol

tardy delta
#

i saved invs in base64 before too

echo basalt
#

base64 is nothing more than a representation of binary data

#

in a short form

tardy delta
#

shouldve done it in binary

dusk flicker
#

I feel like this convo is a perfect example of\

#

?xy

undone axleBOT
echo basalt
#

as we grab 1 long (8 bytes, or 64 bits) and represent it with a single character

#

and do some padding

tardy delta
#

🤡

echo basalt
#

like

#

the padding is just adding == at the end most of the cases

fresh timber
#

but seriously how can I get the title or save it in my base64 and btw I did this only cus I know the length of each title

dusk flicker
#

why do you need to save the title?

fresh timber
#

bruh ;-;

dusk flicker
#

again, do you NEED to save the inventory names? What inventories are you trying to save

fresh timber
#

yes they are inventory pages for my server and I save the inventory for each player when they close the inventory so I need to be able to know what inventory they have open with the title

tardy delta
#

at that point id just use gson or smth

fresh timber
#

hm oh wait

#

I could just set the title when they open inv

#

;-;

#

im kinda stupid sometimes

dusk flicker
#

Lol

#

thats why I was asking, if its a constant title with minor changes, you shouldent have to save it

fresh timber
#

oh wait I cant set the title ;-;

#

or no I could

delicate narwhal
#

how can i downlaod buildtool.jar

remote swallow
#

?bt

undone axleBOT
delicate narwhal
#

yea but i dont understand it

remote swallow
#

One sec

alpine cairn
#

How would I go about making something happen at a regular interval, for instance have a message broadcast every hour on a server?

tardy delta
#

use BukkitScheduler::runTaskTimer or use a ScheduledExecutorService or whatever its called

delicate narwhal
#

on what?

tardy delta
#

not talking to you

delicate narwhal
#

ok sry

delicate narwhal
delicate narwhal
#

yea i alr downloaded it but i dont know how i cna bring it to my server so it turns the paper server into a spigot server

quiet ice
#

Turning paper into spigot is dangerous, perhaps even not possible

delicate narwhal
#

but i thought it would work with buildtools

remote swallow
#

Buildtools just builds the spigot server jar

delicate narwhal
#

hmmm

buoyant violet
#

how do i use compareTo() and what is this

delicate narwhal
#

but how cna i turn tnt dupers on paper server on??

buoyant violet
delicate narwhal
#

how?

buoyant violet
#

go to the files of paper

remote swallow
#

Somewhere in the config folder

buoyant violet
#

exactly

#

there a config

delicate narwhal
#

ok

remote swallow
#

Paper-wolrd-defaults or paper -global

buoyant violet
dusk flicker
#

damn beat me to it

buoyant violet
#

?help

undone axleBOT
#
CafeBabe Help Menu
*Red V3*
**__Admin:__**

selfrole Add or remove a selfrole from yourself.

**__Cleanup:__**

cleanup Base command for deleting messages.

**__Core:__**

embedset Commands for toggling embeds on or off.
info Shows info about CafeBabe.
licenseinfo Get info about Red's licenses.
mydata Commands which interact with the data CafeBabe has about...
set Commands for changing CafeBabe's settings.
uptime Shows CafeBabe's uptime.

**__Downloader:__**

findcog Find which cog a command comes from.

**__Mod:__**

names Show previous names and nicknames of a member.
userinfo Show information about a member.

**__ModLog:__**

listcases List cases for the specified member.
reason Specify a reason for a modlog case.

**__Permissions:__**

permissions Command permission management tools.

twin venture
#

Hello friends , i need some ideas on something :
iam creating a quest for skywars what is the quest?
when game start , you must be the first one to open a middle chest!
how i can check for that? there is 3 method in the in the api , i will provide a picture :

buoyant violet
#

how do i use compareTo() and what is this

twin venture
#

the quest is : be the first person to open a middle chest!

buoyant violet
#

killer dont expect to be spoonfeeded.

#

they can help you

dusk flicker
undone axleBOT
buoyant violet
#

i dont need for minecraft

twin venture
dusk flicker
#

then

#

?google

undone axleBOT
dusk flicker
#

or for that matter you can probably find it under

#

?learnjava

undone axleBOT
buoyant violet
#

i saw a few websites but idk

#

i am learning java

#

on programmingbydoing

#

can you explain to me

#

a little better

quiet ice
#

compareTo is used to implement sorting

fervent chasm
#

How can I create heads using custom textures (using urls)?

quiet ice
#

It basically returns the "distance" of an object to another

buoyant violet
#

i need to do an assignement

quiet ice
#

For a.compareTo(b):

  • 0 means a and b are at the same place
  • < 0 means b is left to a (or the other way around depending on your representation)
  • 0 means a is left to b (or see above comment)

buoyant violet
#

geol

#

so how do i do that assignement

quiet ice
white dew
#

Hi guys

kindred valley
#

Hello

white dew
#

I'm trying to implement a function to make the player able to climb walls, like a spider 🤔

kindred valley
#

Sure

white dew
#

my idea is to spawn invisible ladders in front of the player when a block is in front of them

#

not sure if thats possible

kindred valley
#

Make a custom ladder without texture

#

Pack it

#

Done

white dew
#

oooh

#

Idk how to do It, but thanks, now I know there is a way

#

I mean, creating custom blocks

kindred valley
#

Custom Models, you can customize an item, give it a data and then make a texture of which material that item has been done

#

So you will be able to make invisible ladder

quiet ice
#

You could spawn a vine block behind them I believe, but idk

white dew
#

nice

buoyant violet
#

i am italian

kindred valley
#

But dont know how you can control player to touch a wall

#

Maybe use an api

quiet ice
kindred valley
#

I mostly use them in BigDecimals

quiet ice
#

It's not going to get better. Though if this is the first time you are stumbling on something I guess you are still in the clear

buoyant violet
echo basalt
#

you gotta spawn vines with a wall-detection algorithm

buoyant violet
#

yo this assignement is annoying asf

#

idk how to do it

quiet ice
#
if (name.compareTo("myOtherString") < 0) {
  System.out.println("https://www.youtube.com/watch?v=O2W0N3uKXmo")
}
scarlet breach
#

is there an event when you jump onto a field and what is on it is mined?

quiet ice
#

?jd-s

undone axleBOT
quiet ice
#

Most likely player interact event

simple shale
#
   public boolean registerFlags() {
     try {
       SimpleFlagRegistry flags = (SimpleFlagRegistry)this.plugin.wg.getFlagRegistry();
       flags.setInitialized(false);
#

the .getFlagRegistry(); is red, I'm not sure what the problem is

#
this.plugin.getServer().getScheduler().scheduleSyncDelayedTask((Plugin)this.plugin, () -> paramItem.remove(),
#

theres also a problem with paramitem

sterile token
#

Also there is no need to cast (Plugin) this.plugin while using schedules

#

I think its because of your ide

eternal oxide
#

red = method doesn;t exist

simple shale
sterile token
#

If something is red because something doesnt exists or is not what the IDE expect

simple shale
#

teh getflagrefistry() is red

#

so i cant build

#

i dont know how to debug it

eternal oxide
#

the method doesn't exist

simple shale
#

Any fixes?

eternal oxide
#

yes, don't use things which don't exist

simple shale
#

if you aren't going to help me don't speak do your own thing

tardy delta
#

wasnt the answer clear enough?

eternal oxide
simple shale
quiet ice
#

Just create that method

eternal oxide
#

he's trying to call a method in Worldguard but using his own instance, when it's actually static

quiet ice
#

whatever

simple shale
#

wt

#

i tried

#

adding

#

GetInstance()

#

now WorldGuard is red

#

ok i fixed it

vocal cloud
#

What's wrong with paramItem

onyx fjord
#

is anyone aware whats going on?

Exception in thread "main" java.io.FileNotFoundException: /home/kaspian/.local/share/.m2/repository/org/spigotmc/minecraft-server/1.18.2-R0.1-SNAPSHOT/minecraft-server-1.18.2-R0.1-SNAPSHOT-maps-mojang.txt (No such file or directory)
        at java.base/java.io.FileInputStream.open0(Native Method)
        at java.base/java.io.FileInputStream.open(FileInputStream.java:216)
        at java.base/java.io.FileInputStream.<init>(FileInputStream.java:157)
        at java.base/java.io.FileReader.<init>(FileReader.java:75)
        at net.md_5.specialsource.JarMapping.loadMappings(JarMapping.java:246)
        at net.md_5.specialsource.SpecialSource.main(SpecialSource.java:243)
#

i've built spigot with remapped arg but still

undone kraken
#

you might have built for 1.19.2

onyx fjord
#

nope

#

java -jar BuildTools.jar --rev 1.18.2 --remapped

fervent panther
#

How do I get the x closest entities to a location?

#

For example getting the 3 closest entities from a player

onyx fjord
#

Player#getNearbyEntities?

fervent panther
onyx fjord
#

any ideas why?

#

?bt

undone axleBOT
onyx fjord
#

not an option

#

i'm using zsh

cobalt thorn
#

Hi a question is possible to make everyone not seeing everyone else like none is in the server but only you?

onyx fjord
#

on server list?

cobalt thorn
#

How

cobalt thorn
vocal cloud
#

Hypixel does it lol

onyx fjord
#

packets yea

vocal cloud
#

Anyone can do it

tardy delta
#

Player#hidePlayer over Bukkit.getOnlinePlayers

undone kraken
#

I got this error: java.lang.NoSuchFieldError: ITEM
with this code: Registry.ITEM.register(ResourceKey.create(Registry.ITEM_REGISTRY, ...
pls help

white dew
#

Hi guys

#

I'm trying to make an event that happens when you right click a block

#

however, everytime the player clicks on the block, the event gets executed two times in a row

#

The method is likely being called on both the server and the client

#

How can I make so It's only called on the server/client?

remote swallow
#

the method gets called for start of click and end of click iirc

white dew
#

hmmm

eternal oxide
#

?hands

#

?hand

white dew
#

Weird, It doesn't do the same with RIGHT_CLICK_AIR

eternal oxide
#

it fires for each hand

white dew
#

well, when the action is Action.RIGHT_CLICK_AIR, It doesn't 🤔

#

is this only for Action.RIGHT_CLICK_BLOCK?

remote swallow
#

?interactevent

undone axleBOT
#

The PlayerInteractEvent may be called once per hand. If you only want code to be executed once, you can check the result of https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerInteractEvent.html#getHand(), then decide functionality.

For example, only executing code if the main hand was used:

@EventHandler
public void onPlayerInteract(PlayerInteractEvent event) {
    if (event.getHand() != EquipmentSlot.HAND) { // * if the hand used is NOT the main hand:
        return; // do not progress past this point  |
    }
    // provide functionality
}
white dew
#

Oh

#

thank you, I'll see If It works

#

IT WORKS WOOOO

#

thank you!

undone kraken
#

does anybody know why I get this error: java.lang.NoSuchFieldError: ITEM
with this code: Registry.ITEM.register(ResourceKey.create(Registry.ITEM_REGISTRY, ...

NMS mojang mappings 1.19.2

chrome beacon
#

Don't register new items

eternal oxide
#

you didn;t remap

chrome beacon
#

The client won't be able to understand them

glossy venture
#

how would i get the UUID associated with a username without them necessarily having joined the server before? id assume something with mojang authlib

sterile token
#

java.lang.NoClassDefFoundError: com.mongodb.client.MongoClient i love mongo- hahaha

civic wind
#

Am i doing something wrong with PDC? Never used it before

sterile token
rotund ravine
#

well apparently not

sterile token
#

Hmnn

rotund ravine
#

did u look it up before trying to use it?

civic wind
sterile token
civic wind
#

oh you wasnt talking to me??

rotund ravine
tardy delta
tardy delta
#

"my epic itemstack".equals(pdc.get(key, PersistentDataType.STRING)) or smth

#

dunno ifs its nullable

sterile token
civic wind
rotund ravine
#

@civic wind u gotta get the meta and set it after changing the pdc

civic wind
#

ohh

rotund ravine
tardy delta
#

and id store the namespacedkey as a constant on class level

#

forgot about that tbh

civic wind
#

Still stuck at the debug message hmm :/

tardy delta
#

dont create the itemstack every time

#

and clean up your warnings

sterile token
tardy delta
#

whats your dependency

sterile token
tardy delta
sterile token
#

And its telling me that its not founding the ConnectionString class but the lib is shaded correctly

sterile token
tardy delta
#

i didnt have to shade it lol

#

just the dependency

#

well leaving scope empty shades it automatically ig

sterile token
#

Yeah i know that

#

But didnt fix it tho

#

Also the most shity thing is that its working yesterday

#

😡

civic wind
vocal cloud
#

If you've got a static never-changing item instantiate it once and then just give it to players

mighty pier
#

if i store a player in a database and in the plugin when the player joins and then load all players into the plugin on start

#

could it cause memory leaks or something like that

#

like if there are thousands of players

vocal cloud
#

As long as you map things right it won't

#

You can always populate it with test data

mighty pier
#

putting the user in an arraylist of users

vocal cloud
#

You can also lazy-load the data depending on what you need

mighty pier
#

banning and changing other stats of the player

#

maybe

#

when a player does a command

#

and its not loaded in the plugin

#

it goes through the database to find the player

#

but i think that would be worse

tardy delta
#

dont load all players lol

vocal cloud
#

Again, depending on what you need you should lazy load your data

mighty pier
#

user*

#

wym by lazy loading

tardy delta
#

only load it when needed

vocal cloud
#
Lazy loading is the practice of delaying load or initialization of resources or objects until they're actually needed to improve performance and save system resources.
tardy delta
#

get ninjad

vocal cloud
civic wind
vocal cloud
mighty pier
#

becuase it has to go through all the players in the sql file

civic wind
vocal cloud
#

Just make a static final variable and assign it the function call of getItem();

mighty pier
#

    private final UUID uuid;
    public UUID getUuid() {
        return uuid;
    }
    public Player getPlayer() {
        return Bukkit.getPlayer(uuid);
    }

    public User(UUID uuid) {
        this.uuid = uuid;
    }
}``` thats the class thats gonna be stored in a list
vocal cloud
mighty pier
#

im gonna add more variables later

civic wind
mighty pier
#

but also

#

could i keep a different thread

#

open

vocal cloud
#

No reason to.

mighty pier
#

there is

#

i have boxes in my other plugin

vocal cloud
#

Execute a scheduled service if you need to.

mighty pier
#

and it has to loop through a bunch of blocks

#

and there could be a lot of arenas

#

and if i just put runtaskasync

#

it would run out of cores

#

so no async

vocal cloud
#

Why would it run out of cores?

mighty pier
#

a lot of arenas

#

if i put runtaskasync in every arena

vocal cloud
#

Okay? That's not how scheduled threads work

mighty pier
#

ok

#

thanks for knowledgfe points

vocal cloud
#

You create a scheduledexecuterservice and make it 1 thread and you can throw everything into it

#

Then, it will process 1 by 1

#

if you don't want a delay then executorService

mighty pier
#

send scheduledexecuterservice tutorial

vocal cloud
#

its the same as bukkits

mighty pier
#

do i just put runtaskasync on the bukkit runnable?

tardy delta
#

an Arena shouldnt be aware of its surrounding database

mighty pier
#

why not

#

its cleaner uwu

tardy delta
#

it should be the other way around

mighty pier
#

but then i have to do arenamanager.createarena

#

thats no fun

mighty pier
tardy delta
#

i just told you, an arena shouldnt be aware of the database

serene sigil
#

yo is there a way to open a written book gui?

#

ive searched everywhere but i cant find anything

mighty pier
serene sigil
mighty pier
warm token
#

?paste

undone axleBOT
warm token
#

I'm trying to get the selection of a player using WorldEdit API

#

Why, even creating a selection with the wand, I still get the EmptyClipboardException?

serene sigil
mighty pier
#

just google it

#

nms books spigot

#

or sometrhing

#

or use protocollib

serene sigil
#

where can i download nms?

#

@mighty pier

mighty pier
#

replace spigot-api in the pom.xml to spigot

remote swallow
#

?bt

undone axleBOT
eternal oxide
#

search jeff-media using nms

mighty pier
#

?learnjava

undone axleBOT
serene sigil
#

sry im very new to spigot

remote swallow
#

run bt

#

change that in ur pom.xml

serene sigil
#

what is build tools?

remote swallow
#

the thing that builds spigot and gives you full access to allof spigot

serene sigil
remote swallow
#

change the spigot-api to just spigot

#

after running buildtools

serene sigil
#

cuz i just converted to maven

remote swallow
#

add the dep then

serene sigil
#

ye but what is the dep??

#

im currently using the shaded.jar

hazy parrot
#

That doesn't looks like maven

serene sigil
#

ik

serene sigil
#

why aint this right?

remote swallow
#

remove the -api

sterile token
#

I have find what is happening!!

#

After 30m checking code and restarting, etc i realize i accidentally uploaded the not shaded jar + all time restarting uploaded the shaded one, but never realize the not shaded was already uploaded

#

Im defintly a 🤡

tardy delta
#

:o

twin venture
#

Hello anyone using UltraSkywars [ i know its abandoned and its open source ]
iam trying to do a check ,
[Check if the chest is opned , is one of the middle Chests] ..
there is few things in the api for the chests , but i tried few things and didn't work

#

the code keep running even if i open a island chest

#

it should only run if its a center chest

serene sigil
tardy delta
#

and do mvn reload

twin venture
#

i was thinking maybe i can check if the player location is near the middle chest [ center chest] , if so the continue the code :

#

ideas please?

quiet ice
#

You are better off getting someone else to do it for you, I guess

sterile token
serene sigil
#

oh ye i did

rough drift
#
ItemStack item = new ItemStack(Material.MAP, 1);
MapView view = Bukkit.createMap(itemFrame.getWorld());
for (MapRenderer renderer : view.getRenderers()) {
    view.removeRenderer(renderer);
}

TestMapRenderer renderer = new TestMapRenderer();
view.addRenderer(renderer);

MapMeta mapMeta = (MapMeta) item.getItemMeta();
mapMeta.setMapView(view);
item.setItemMeta(mapMeta);

crashes with

java.lang.ClassCastException: class org.bukkit.craftbukkit.v1_19_R1.inventory.CraftMetaItem cannot be cast to class org.bukkit.inventory.meta.MapMeta (org.bukkit.craftbukkit.v1_19_R1.inventory.CraftMetaItem and org.bukkit.inventory.meta.MapMeta are in unnamed module of loader java.net.URLClassLoader @45fe3ee3)

The item meta is a map meta no?

tardy delta
#

isnt it FILLED_MAP

remote swallow
rough drift
#

that improved the result

twin venture
serene sigil
twin venture
#

what's the diffrence i mean why its faster

remote swallow
undone axleBOT
remote swallow
#

download the jar and git then run the correct command

hazy parrot
remote swallow
serene sigil
hazy parrot
remote swallow
#

cerate a new folder

#

drag the buildtools jar into that folder

#

right click, click open gitbash here

hazy parrot
#

you dont even need git

remote swallow
#

type java -jar BuildTools.jar --rev 1.major.minor then press enter

remote swallow
eternal oxide
#

BT downloads it's own Git/maven

remote swallow
#

you learn something new everyday

sterile token
rough drift
#

So I ran into an issue: Using a custom map renderer it seems as if when another player block-picks the map I can't see it anymore unless I also select it

#

why's that?

#

Also, it seems as if something is still sending a ton of map packets, even though I removed all renderers (including mine)

rough drift
ashen lynx
#

Hi! How can I block sideways moving of a player who riding a horse?

echo basalt
#

it's too fuckin slow

twin venture
#

Hello , is there a better way i can imporve this working code?

#

its working correctly , but i want to improve it , as i see allot of if statments , and for loops

round finch
echo basalt
#

First things first

#

Ctrl + Alt + L

#

It should restructure it

#

a flaw I notice is that you're doing return; inside for loops

#

which completely returns the method, instead of skipping the iteration