#help-archived

1 messages ยท Page 82 of 1

idle zodiac
#

like

#

no

#

my brain

#

in code

heady jolt
#

execute the command in code

idle zodiac
#

would it work if the border was in a different world though?

#

should i use the worldborder api?

heady jolt
#

you should use the API if you don't want to do all the heavy lifting.

idle zodiac
#

AH

#

ok

#

i see what to so

#

stackoverflow is good

#

cya

heady jolt
#

cool

paper compass
#

Whats a good plugin to stop players from crashing the server

heady jolt
#

investigate what method they use to crash your server

remote socket
#
                //give player an iChest
                ItemStack infChest = new ItemStack(Material.ENDER_CHEST, amount);
                ItemMeta itemMeta = infChest.getItemMeta();
                itemMeta.setDisplayName(ChatColor.translateAlternateColorCodes('&', plugin.getConfig().getString("iChest.displayname")));
                List<String> lore = plugin.getConfig().getStringList("iChest.lore");
                for (String line : lore) {
                    ChatColor.translateAlternateColorCodes('&', line);
                }
                itemMeta.setLore(lore);
                infChest.setItemMeta(itemMeta);
                //set nbt tag
                NBTItem nbti = new NBTItem(infChest);
                nbti.setBoolean("isInfiniteChest", true);
                infChest = nbti.getItem();
                reciever.getInventory().addItem(infChest);
#

Any ideas why the &7 colour code didnt work

tiny dagger
#

replace colors propely then?

hoary parcel
#

Or use components...

tiny dagger
#

string consider as if they are finals

#

all their methods that returns something returns a new string

#

so you'll have to pass it back somehow

hoary parcel
#

Pls don't confuse final and immutable

#

Different concepts

tiny dagger
#

immutable

hoary parcel
#

Final means you can't redefine a reference, immutable means you can't change/mutate an object itself

tiny dagger
#

i just couldn't find my words

remote socket
#

Or use components...
Components?

tiny dagger
#

the chat api

#

but mini was probabily promoting his own message system he made

jaunty night
#

Is it possible to create custom items as you do custom entities?

wanton delta
#

wdym

magic heart
#

Hello, how can i repair crates from ingame command /cc list "broken crates"? Thanks.

proper rune
#

Anyone knows how to get the UUID of an offline player in BungeeCord?

jaunty night
#

I'm making an mmo rpg plugin and I need custom items. They'll be based on vanilla items like custom entities are but have there own stats and abilities that pertain to that item.

frigid heath
#

how do i remove players from a scoreboard?

tiny dagger
#

you set them an empty one

#

if that's what you asking for

frigid heath
#

dont quite understand

#

i assume i have to use resetScores?

idle zodiac
#

what's the legal way to do new Block()?

stark salmon
#
new Block(legal)
idle zodiac
#

XDDD

stark salmon
#

lol idk, sorry

#

i just crashed eclipse trying to duplicate a class

idle zodiac
#

wait

#

you use eclipse?

stark salmon
#

um

#

maybe

idle zodiac
#

we hereby sentence you to bucket kick

stark salmon
#

shit i knew i couldn't run for all this time

idle zodiac
#

XD

stark salmon
#

what other options are ther

#

there*

idle zodiac
#

i use intellij

#

only use intellij

stark salmon
#

ok

idle zodiac
#

or commit game end

stark salmon
#

eclipse crashes it's buggy ass every like 3 seconds

#

is that more stable

idle zodiac
#

ofc

#

its jetbrains

stark salmon
#

never mind, my entire system just crashed

tiny dagger
#

sounds like a you problem not an eclipse problem ๐Ÿค”

sturdy oar
#

bruh eclipse

idle zodiac
#

everything is an eclipse problem

#

blame all on eclipse

#

even if you are coding with fucking scratch

#

it's eclipse's fault

sturdy oar
#

I think like 80% of Mojang's code has been made with Eclipse

idle zodiac
#

i'm moving to fortnite guys

marsh nova
#

I use Eclipse, nothing wrong with it

idle zodiac
#

NO9

#

HOW COULD YOU

#

A VERIFIED MEMBER

#

USING ECLIPSE?!

#

we hereby sentence you to under an incoming train lie

sturdy oar
#

well I use Apache NetBeans ๐Ÿคทโ€โ™‚๏ธ

stark salmon
#

my entire system crashed from trying to copy a file

#

linux for the win ..!
....

frigid heath
#

well i occasionally use notepad

stark salmon
#

yeah i use nano and gedit

#

why the FUCK wont FILES OPEN

idle zodiac
#

ne.

#

ne...

#

net bbb eans?

wanton delta
#

i use np++

idle zodiac
#

ok

#

thats it

#

i'm never speaking to any of you again

stark salmon
#

iM GONNA SWITCH

#

iM ANGRY

#

i lost a lot of work because i did such an act of TRYING TO COPY A FILE

idle zodiac
#

goo

#

d

subtle blade
#

Eclipse is a fine IDE

idle zodiac
#

ye

subtle blade
#

I use it myself

idle zodiac
#

i'm blocking you

#

XDDD

#

HOW DARE YOU

subtle blade
#

You should use whatever you are comfortable with

stark salmon
#

it constantly crashes for me ๐Ÿ˜ 

idle zodiac
#

A STAFF MEMBER

#

USING ECLIPSE

stark salmon
#

i like eclipse but it crashes constantly

idle zodiac
#

DISGUSTANG

#

XD

subtle blade
#

I prefer it PES2_Shrug

idle zodiac
#

no you dont

#

now

#

go and sit down in a dark room with a cold flannel and an aspiriin

#

and reevaluate your life problems

stark salmon
#

i like eclipse because you dont need to open a terminal to build every time unlike.. other ides

idle zodiac
#

you dont have to with intellij

#

also

#

its freee

#

intellij community

#

i use it

stark salmon
#

m

subtle blade
idle zodiac
#

NO

#

WHAT IS WRONG WITH YOU

#

YOU KNOW MY WEAKNESS

#

AaAaAaA

stark salmon
#

eclip

#

how do I search a player's inventory for an item

#

while checking the amount too

idle zodiac
#

use an itembuilder

#

you can check for an itemstack with amount

#

its really ez

mild osprey
#

Besides adding a note on a plugins discussion page and clicking the "report" anything else should I do for a plugin my host showed me has a bug in it creating ddsos attacks confirmed.

crimson sandal
chrome edge
#

Is anybody there who knows chunks? I made a queue system but it doesn't like I wanted to do... Queue place 1000 blocks per tick but it is still not great as I expected. I don't know the chunks a lot but I think we can set chunk bytes and send it as a generated chunk to player after placing.

tulip pendant
#

Someone help me portfirward :(

stark salmon
#

ok

#

do you have an xfinity router

#

or netgear or waht

#

what*

idle zodiac
#

How to I detect if a Block is fully-grown wheat?

remote socket
#

My project hierachy just dissapeared

idle zodiac
#

rip

remote socket
#

Anyone got a clue how to undo this? I'm using Intellij

idle zodiac
#

that might be a good place to start

tiny dagger
#

ctrl z?

#

๐Ÿค”

remote socket
#

I'm fed up of hearing that, do you not think i would have googled before i asked ๐Ÿคก

idle zodiac
#

no

sick citrus
#

Hey guys.
Using a server resource pack, some clients work flawlessly and download and apply the resourcepack, but other clients are stuck on "downloading : 100%"

idle zodiac
#

rip

sick citrus
#

the only correlation I see is that linux-based clients seem to work better.
Any idea why that would happen ?

#

Also, I can say that the clients getting stuck at "downloading : 100%" are not even trying to download the file.

remote socket
#

I just reimported maven projects and its back ๐Ÿ˜…

sick citrus
#

server-resource-packs has been emptied, and the client rebooted

idle zodiac
#

nice

stark salmon
#

so i've imported the inventory.event libraries from bukkit but it says event.getCurrentItem() is invalid

#

what do I do

sick citrus
#

Learn how to use the api ?

stark salmon
#

..

sick citrus
#

And how to ask for help :p

stark salmon
#

ok

#
ItemStack item = event.getCurrentItem();
import org.bukkit.event.inventory.*;

that is the right import, right

frigid ember
#

games released on steam using eclipse: Equilinox
games released on steam using intellij: none

#

๐Ÿค”

sick citrus
#
ItemStack item = event.getCurrentItem();
import org.bukkit.event.inventory.*;

that is the right import, right
@stark salmon

Which event are you in ? ...

stark salmon
#

onCommand

#

shit

#

i just realized

delicate iron
#

Could you ban @ripe token , he randomly dmed me and tried to trade gta 5 for discord server boosts

frigid ember
#

boots ๐Ÿ˜ณ

ripe token
#

xD but i said good prize

delicate iron
#

Gta 5 is currently free on the epic launcher btw

ripe token
#

yea but i don't said gta i said good prize

delicate iron
#

mhm

ripe token
#

?

worldly heathBOT
#

Edit this to change the output of the command!

ripe token
#

mhm?

stark salmon
#

i'm downloading epic right now just for that damn free gta V

#

fuck my code just died, i used 1 deprecated method and shit hits the fan

#
The method getItemInMainHand() is undefined for the type Player

what do I do now

tiny dagger
#

player getinventory getiteminmainhand

stark salmon
#

oh ok

#

Thank you

tiny dagger
#

no problem

stark salmon
#

can I cast a material to an itemstack

#

to check what the item stack is

tiny dagger
#

no

#

getType

stark salmon
#

ok

tiny dagger
#

Material

stark salmon
#

thank you

sick citrus
#

So for my resourcepack stuck at "downloading : 100%" error

#

turns out

#

stupid minecraft on windows uses SSLv3

#

when the server only supports tls 1.1 and 1.2

stark salmon
#

oh

#

F

stable pagoda
#

when you add an attribute to an item it gives you the text of "when in main hand..." and so on does somone know how to change that?

stark salmon
#

isnt SSLv3 a bit overkill for minecraft

sick citrus
#

yeah you really don't have a clue what you're talking about. It's fine.

stark salmon
#

but..
i have a small hint of a clue but not really

#

ill just stop talking

dense escarp
#

i want developer to help me in my server

naive goblet
#

This channel is not made for recruiting.

frigid ember
#

How do I fix that ''waiting for chunk'' issue when generating new chunks with an elytra?

light crescent
#

What could cause an entity's DataWatcherObject values to not be properly passed on to the client? For instance, when creating a custom horse entity, the horse will always spawn white, no markings, with no saddle, although all of these values are set prior to the spawning of the entity. The DataWatcherObject is registered in the initDatawatcher() method override.

west temple
#

hello, is there a way to add currnecy to the winner of bedwars ?

#

im using Screaming Bedwars and EssentialsX and vault

#

scre aming'

tiny dagger
#

does it have a reward system?

#

๐Ÿค”

west temple
#

dont know

naive goblet
#

Obviously use the Vault API ?

#

@light crescent Idk but perhaps share your current code?

west temple
#

@naive goblet

#

what is the diffrnece

naive goblet
#

difference between?

west temple
#

Vault and Vault API

#

or is it the same

naive goblet
#

Oh you're not a developer

west temple
#

nope

naive goblet
#

Makes sense then

west temple
#

just need help and im gone

naive goblet
#

Well does Screaming Bedwars has some sort of command execution on win?

west temple
#

it gives message and updates the leaderboard

naive goblet
#

what version?

west temple
#

latest

naive goblet
#

minecraft versions 1.15.2?

west temple
#

yep

light crescent
#

Sure Conclure; I'll trim off the excess, non-related parts of the code so whoever reads isn't digging through a bunch of unrelated methods.

naive goblet
#

good

#

@west temple talk with the developer. He knows his config better than I do probably

west temple
#

nvm i found Vault Reward variable in the config sry

light crescent
hollow thorn
#

how do i make a tank

pine goblet
#
        try {
            PreparedStatement statement = Permissions.getInstance().mySQL.getConnection().prepareStatement("SELECT * FROM users WHERE UUID=?");
            statement.setString(1, uuid.toString());

            ResultSet results = statement.executeQuery();
            if (results.next()) {
                return true;
            }
        } catch (SQLException e) {
            e.printStackTrace();
        }
        return false;
    }```
#

for some reason this works usually but does not work on my new plugin

#
            if (Methods.playerExists(player.getUniqueId())) {
                Methods.createPlayer(player.getUniqueId(), player);
            }
        }
        
        if (Permissions.getInstance().getConfig().getString("users." + player.getName() + ".rank") == null) {
            UserManager.setPlayersRank(player, "default");
            Permissions.getInstance().saveConfig();
        }```
#

this is the method where it does not work

frigid ember
#

I've tried 3 different packets to cancel players from viewing there mining block status

#

        this.protocolManager.addPacketListener(new PacketAdapter(this.plugin, PacketType.Play.Server.BLOCK_BREAK_ANIMATION) {
            @Override
            public void onPacketReceiving(PacketEvent event) {
                PacketContainer packet = event.getPacket();
                packet.getBytes().write(0, (byte) 0);
                plugin.getServer().broadcastMessage("Block Break Animation (1)");
            }

            @Override
            public void onPacketSending(PacketEvent event) {
                PacketContainer packet = event.getPacket();
                packet.getBytes().write(0, (byte) 0);
                plugin.getServer().broadcastMessage("Block Break Animation (2)");
            }
        });

#

        this.protocolManager.addPacketListener(new PacketAdapter(this.plugin, PacketType.Play.Client.BLOCK_DIG) {
            @Override
            public void onPacketReceiving(PacketEvent event) {
                PacketContainer packet = event.getPacket();
                packet.getPlayerDigTypes().write(0, EnumWrappers.PlayerDigType.ABORT_DESTROY_BLOCK);
                this.plugin.getServer().broadcastMessage("Block Dig Listener (1)");
                event.setCancelled(true);
            }

            @Override
            public void onPacketSending(PacketEvent event) {
                PacketContainer packet = event.getPacket();

                packet.getPlayerDigTypes().write(0, EnumWrappers.PlayerDigType.ABORT_DESTROY_BLOCK);
                this.plugin.getServer().broadcastMessage("Block Dig Listener (2)");
                event.setCancelled(true);
            }
        });

#

Still doesn't seem to work?

#

am I writing the packets correctly?

#

is it possible to stop sounds from being played when a block has been burned

#

in 1.13.2 they added wool sound effect to block burned event

#

and its kinda annoying

#

no idea why they though its a good idea

#

there should be a packet

#

pertaining to sounds I believe

frigid ember
#

so i would use something like protocolLib

tiny dagger
#

there is Player#stopSound

frigid ember
#

yeah but what good is that

#

thats just gonna stop the sound at any time

#

i just want it stopped when a block gets burned

#

this might be useful

#

Quick question, what's a VarInt Enum in ProtocolLib?

hoary parcel
#

Most likely just a int

#

With the ordinal of the enun

#

PacketWrapper might wrap the enums, not sure

frigid ember
#

Only 1 way to find out ๐Ÿ˜‰

hoary parcel
#

I don't use protocollib anymore ^^

frigid ember
#

You made your own Packet Listener no?

#

or Packet Management System *

tiny dagger
#

that's easy to do tho ^

#

just hook into the channelhandler ez

frigid ember
#

I guess once you get the hand of packets but I've only just started and gotta familiarize myself.

#

Also when I listen to packets am I required to sendServerPacket of that listened packet for example

#

            @SneakyThrows
            @Override
            public void onPacketReceiving(PacketEvent event) {
                PacketContainer packet = event.getPacket();
                packet.getIntegers().write(0, 0);
                protocolManager.sendServerPacket(event.getPlayer(), packet);

                plugin.getServer().broadcastMessage("Block Break Animation (1)");
            }

#

to sort of over-write it in a way?

#

15.05 13:07:42 [Server] INFO com.comphenix.protocol.reflect.FieldAccessException: No field with type int exists in class PacketPlayInBlockDig.
hoary parcel
#

I don't hook into netty

#

I just hook into the server

#

In minecracts listener and in the send method

#

No need to fiddle with netty

#

Let's me access packets natively and shit

frigid ember
#

Integers dont seem to work.

tiny dagger
#

well

#

it doesn't have an int in that class

frigid ember
#

My gues is to modify Block Break Animation (the status within that block)

#

and it constantly set it to 0 / starting value (pre) for each condition necessary.

hoary parcel
#

Just look at the packet class itself

frigid ember
#

Which one specifically? I'm guess the BlockBreak?

#

how to check if block is on fire

hoary parcel
#

Well whatever field you want to set

#

Lol

frigid ember
#

if block is on fire does that become part of its blockdata?

#

I'm pretty sure fire is a block no?

#

o

#

yeah

#

so i need to check if block face is fire

hoary parcel
#

Fire actually has like a million block states

stark salmon
#

does anyone know a way I can get a random item from a loot table

silk bane
#

populateLoot and then pick an item from the resulting collection

stark salmon
#

ok

#

i try to make a collection but i dont know which library it's in

#

and I cant figure out how to access populateloot, i have the javadoc open and it wont show it's parent

silk bane
#

populateloot returns a collection

hollow thorn
#

how do i make a tank

stark salmon
#

i did LootTable.populateLoot and it says it's not existent
I have LootTable in my imports

silk bane
#

you need a loot table to populate loot with

#

it's not a static method

stark salmon
#

oh

#

makes sense

silk bane
stark salmon
#

if I wanna get END_CITY_TREASURE how would I go about doing that

keen compass
#

you can also make your own LootTable too

stark salmon
#
Collection<ItemStack> col = LootTable.populateLoot(LootTables.END_CITY_TREASURE);

what about this

#

it says that's not applicable as an argument

#

oh random

#

i need to look at the arguments on the javadocs

frigid ember
#

nah

#

dont think i can stop the sound in the event

stark salmon
#

what is a loot context

languid gyro
#
public class BreakBlock_FireEvent implements Listener {


    @EventHandler
    public void blockBreak(BlockBreakEvent event) {
        Player player = event.getPlayer();
        if(player.equals(GameMode.SURVIVAL)) {
            Bukkit.dispatchCommand(Bukkit.getConsoleSender(), "execute at @p run summon minecraft:tnt ~ ~ ~ {Fuse:80}");
        }




    }
}```
wut do wrong
#

Tryna fire a command everytime a block gets broken in survival

silk bane
#

player.getWorld().spawnEntity

languid gyro
#

yeah that would be better to use

silk bane
#

reason that doesn't work is @p doesn't mean anything from the console

#

you could replace it with the player name instead

stark salmon
#

how do I call populateLoot if it's non static

drifting parrot
#

@ Inkzzz i have a simple question regarding resource rules on the spigot website; a second of your time please?

#

its regarding an already existant resource that may be breaking that rule, if existant

silk bane
drifting parrot
#

how do i open a report?

silk bane
#

click the button that says 'report'

drifting parrot
silk bane
#

on the resource page

drifting parrot
#

oh my bad

stark salmon
#

what is a loot context

drifting parrot
#

is there any other way to get this question answered though

#

i'd like to talk to the author before throwing a report at him

silk bane
#

send them a message then

frigid ember
#

i thought that if i cancel the blockburnevent and set the block to air manually it would not play the sound

#

i thought wrong

brisk mango
#

@runic wadi 40 years software engineer HAHAHHAHAHHAHAAHAHHAHAH

#

youre incredible

frigid ember
#

how many years u have?

brisk mango
#

Why would i tell you that

frigid ember
#

why not

brisk mango
#

40 years of experience apparently and doesnt know difference between singletons and constants

frigid ember
#

omg

brisk mango
#

sad

#

actually, more than sad

frigid ember
#

still moaning about that

#

move on

stark salmon
#

does anyone know how to use populateLoot?

stark salmon
#

I have no idea how to use it from the javadocs

#

Apparantly you need a lootcontext but a lootcontext doesn't take a lootTable as an input

frigid ember
#

i have no idea either i dont think anybody knows here

tiny dagger
#

singletons and constants aren't even similar, who can confuse them ๐Ÿ‘€

frigid ember
#

just better to watch a video

tiny dagger
#

it still is fatal

#

nothing even changed about it

silk bane
#

LootTables.WHATEVER.populateLoot(new Random(), new LootContext.Builder(location).build())

tiny dagger
#

like ever

silk bane
#

and no i don't care that i'm constructing a new random every time

stark salmon
#

can I run that from the console

frigid ember
#

wat

languid gyro
#

well I got it working but confused how to make it so the tnt only happens in survival

Doesn't do anything with the if statement

works w/o it

public class BreakBlock_FireEvent implements Listener {


    @EventHandler
    public void blockBreak(BlockBreakEvent event) {
        Player player = event.getPlayer();
        Location loc = player.getLocation();


        if(player.equals(GameMode.SURVIVAL)) {
            player.getWorld().spawnEntity(loc, EntityType.PRIMED_TNT);
        }

    }


}```
stark salmon
#

and populateLoot is part of LootTable

sturdy oar
#

The hell is that naming syntax

languid gyro
#

bit new to java and just started spigot today

silk bane
#

@languid gyro how the heck is a player going to equal a gamemode

#

your ide should be highlighting that yellow

frigid ember
#

oh yeah

silk bane
#

if it's not, install intellij

languid gyro
#

using intellij

silk bane
#

player.getGameMode() == GameMode.SURVIVAL

sturdy oar
#

konsolas , any ide would higlight that

silk bane
#

well it should be yellow then

languid gyro
#

thanks

silk bane
#

and next time something's yellow, try and find out why the IDE is making it yellow first

drifting parrot
#

intellij is very good at hey feckin idiot dont do this

#

recommend 10/10

sturdy oar
#

98% of the times IntelliJ is correct

brisk mango
#

player.getGameMode() == GameMode.SURVIVAL), another dude comparing enums with .equals

#

@languid gyro

frigid ember
#

why does it matter that much its going to have the same result in that instance

brisk mango
#

You are genuinely retarded, it doesnt have the same result, in the first place the equality operator is faster, in the second place its safer at compile time, its safer at run time, and it prevents null pointers

#

there are plenty reason why you have to use == for enum comparing

#

also, there is no needed for .equals since there is only one instance

frigid ember
#

but its still gonna have the same result

brisk mango
#

๐Ÿคฆโ€โ™‚๏ธ

silk bane
#

there'll be no difference in speed because there's no way the JVM doesn't inline that

#

null safety is the only semantic difference, but getGameMode is guaranteed not null anyway

brisk mango
#

Read my message weirdo, and there is difference in speed

silk bane
#

so really it just looks nicer

frigid ember
#

1 + 1 = 2

#

result = 2

brisk mango
#

method is different than an operator

frigid ember
#

1 + 1 - 1 - 1 + 2 = 2

#

result = 2

#

same result

#

differnt way

brisk mango
#

You are genuinely retarded, it doesnt have the same result, in the first place the equality operator is faster, in the second place its safer at compile time, its safer at run time, and it prevents null pointers
@frigid ember

#

You think using == and .equals will have same result?

#

i say, no.

#

@silk bane I mean comparing null with .equals will throw an null pointer

languid gyro
#

Yeah got it tho

brisk mango
#

there is so many reasons why not to use .equals on enums

silk bane
brisk mango
#

its not the same

silk bane
#

it's not null

brisk mango
#

there is nothing like a certain situation

#

im not talking only about null

#

im talking about many other reasons

#

read my message above

#

that its faster, safer at runtime/compile time

frigid ember
#

dude

#

why so toxic

silk bane
#

it's not faster, the only 'safety' is null safety

frigid ember
#

hey im having trouble with the plugin : mob headsthe heads are not dropping how to fix

#

i do have permsission and looting 1200 to see the mobhead plugin if its on as i saw its off how to fix

#

get a grip

brisk mango
#

wowow hold your horses, how is an method faster than an operator?

silk bane
#

are you aware of the jvm?

brisk mango
#

yeah, aware of that

#

but are you aware that an operator is always faster than an method?

stark salmon
#

I'm getting closer to getting the loot table items

silk bane
#

the method will almost certainly be inlined by the jvm, and be equal in performance to the operator.

brisk mango
#

and thats not right.

stark salmon
#

LootContext lc = new LootContext(null, 0, 0, null, null);
Collection<ItemStack> col = LootTable.populateLoot(new Random(), lc);
(the lootcontext is just placeholders for now)

brisk mango
#

i think you should fix your knowledge

#

because you are wrong in everything you say

silk bane
#

alright then.

brisk mango
#

what i'd expect from some random spigot developers

#

that have 0 java knowledge

#

and havent taken regular java courses

torn robin
#

Uh

#

konsolas would probably knoe his stuff

#

know *

stark salmon
#

msws do you know how I can get a random item from a loot table into an item stack

brisk mango
#

Method is always slower than an operator @torn robin no matter what

stark salmon
#

im gonna have a STROKE and i dont understand the javadocs

torn robin
#

ok Iโ€™m sure thatโ€™s probably true but it also sounds very trivial

brisk mango
#

then dont say non-senses

torn robin
#

cark is there a getItemStacks method or something?

brisk mango
#

I mean use InventoryClickEvent

celest light
#

Hey, anyone know if there's some lag between the pushes to the maven repo, and the updates tohttps://cdn.getbukkit.org/spigot/spigot-1.15.2.jar ?

I'm getting 'method not found' on my server (itzg docker image, pulls from the cdn on startup) for Pig.setAware(false). It compiles just fine with my local gradle build, which pulls from the maven repo / buildtools.

stark salmon
#

idk theres populateloot but you need some weird ass variables and inputs that I dont know how to get

brisk mango
#

and get the current item that returns an ItemStack

torn robin
#

what was are you able to get the items in the loottable

stark salmon
#

hm?

torn robin
#

@celest light setAware or setAi?

celest light
#

@torn robin setAware is the method I see in my local environment.

torn robin
stark salmon
#

ah shit

#

thanks anyway

brisk mango
#

@NotNull Collection<ItemStack> populateLootโ€‹(@NotNull Random random, @NotNull LootContext context)

#

Are you sure about that

celest light
#

I've got this in my gradle dependencies. compileOnly 'org.spigotmc:spigot-api:1.15.2-R0.1-SNAPSHOT' so I think I've got the latest locally.

torn robin
#

Oh no you right temedy, thought that was directly linked to an inventory

#

zip is aware the same as AI?

stark salmon
#

idk how to use that tho, you need a lootcontext which is batshit insane

torn robin
#

if so Iโ€™d just use that for now

#

Just create a new one

#

The java docs probably say how

stark salmon
#

i did but idfk how to use it if i wanna run it from the console

#

oh

#

i didnt see that

torn robin
#

new LootContext.Builder().killer() etc

celest light
#

@torn robin ok, I'll switch to setAI. Weird that there's some difference though, suggests some kind of version mismatch.

#

Is there a reason the maven repos only have snapshots and no releases? I feel weird using a snapshot when I'm not trying to contribute to spigot, just write some mods.

torn robin
#

Where exactly do you see setAware? The maven or the docs?

stark salmon
#

it needs an entity

torn robin
#

And I wouldnโ€™t know anything about snapshots

#

that would make sense cark, where else are you getting the loottable?

celest light
stark salmon
#

i want to be able to grab a random item from a chest loot table
are those entities or something?

#

like end city loot

torn robin
#

Yeah that is strange idk zip, someone more knowledgeable would have to look into it

vernal spruce
#

downsides of this? .getAttribute(Attribute.GENERIC_FOLLOW_RANGE).setBaseValue(0);

#

i want to basically remove a hostile mob ability to attack stuff

manic bluff
#

new LootContext(location, luck, null, null)

stark salmon
#

what would the location be though if its running from the cnosole

#

console*

celest light
#

@torn robin thanks for the heads up on the setAI, that's probably what I want anyway.

torn robin
#

why and how are you running stuff through console

#

no problem, they don't do the exact same thing but it's hopefully close

brisk mango
#

why couldnt you

stark salmon
#

i mean like im puttting this in a command that i want to run from console

brisk mango
#

Wdym they dont do the same exact thing

split oxide
#

hej, so i made a custom enchant but how would i go about adding it to an enchanting book?

brisk mango
#

How doesnt running a command from console do the same thing as running a command as a player

stark salmon
#

well there isnt a location tied to it right?

brisk mango
#

๐Ÿคฆโ€โ™‚๏ธ

torn robin
#

I thought he meant he's running the function itself as a command

vernal spruce
#

a console doesnt care about permission

#

a player does

split oxide
#

Temedy, you dont get stuff like location, some data and world

naive goblet
#

temedy if the command executes different code depending on the CommandSender?

brisk mango
#

no shit

#

yeah no shit

naive goblet
#

Seemed not so obvious to you

torn robin
#

what are you trying to do again cark?

vernal spruce
#

^

torn robin
#

you're trying to get the loottable of what?

subtle blade
#

LootContext is not a constructable object, Panda

stark salmon
#

run a command that grabs a few random items from the End City Treasure loot table and put them into my Auction House whenever I run a command

brisk mango
#

It is a constructable object @subtle blade

torn robin
#

@subtle blade LootContext.Builder?

subtle blade
#

Its builder is

#

LootContext is not

brisk mango
#

LootContext is

silk bane
#

builder requires a location parameter as well

brisk mango
#

how come i can construct it then?

subtle blade
#

new LootContext(location, luck, null, null)

#

This is incorrect

brisk mango
#

Well if its not a constructable object, how can I construct it then?

subtle blade
#

Well you're a fucking wizard

torn robin
#

it looks like you can use the Enum LootTables.END_CITY_TREASURE to get the loot tables

subtle blade
#

I can assure you it's not possible

brisk mango
#

ah it does have a private constructor

subtle blade
#

That is a private constructor

brisk mango
#

i guess

#

im an wizard then

#

ยฏ_(ใƒ„)_/ยฏ

stark salmon
#

can I make an array of itemStacks from a loot table?

subtle blade
#

I wrote the loot generation event, I know how the loot API works lol

torn robin
#

yes

stark salmon
#

ok

brisk mango
#

nice method calls from constructor

stark salmon
#

does the enum contain the data of the loot table or is it only a "signal" to what type of loot table you want

torn robin
#

You would fill a collection with lootTable.populateLoot and then get a random item from that collection

#

Try LootTables.END_CITY_TREASURE.getLootTable()

stark salmon
#

Ok

subtle blade
#

Yes, populateLoot() is what you'd want

stark salmon
#

Fucking eclipse crashed

naive goblet
#

Spigot Version Notch vs Wizard

brisk mango
#

eclipse

stark salmon
#

aghghg

brisk mango
#

lol

naive goblet
#

Intellij idea is better ;o

boreal tiger
#

whats wrong with eclipse lol

brisk mango
#

everything

split oxide
#

yes it is :]]]]]]]]]

manic bluff
#

intellij > eclipse

frigid ember
#

eclipse

brisk mango
#

worst IDE to be ever created

stark salmon
#

I can't figure out populate loot

boreal tiger
#

lol my gatekeeper detecter is going crazy

torn robin
#

what are you trying cark?

split oxide
#

well not the worst for basic java is it quite good

tiny dagger
#

if it's the worst tell me exactly why it's bad?

#

๐Ÿค”

brisk mango
#

it is worst

boreal tiger
#

"basic java"

brisk mango
#

eclipse is an piece of shit

tiny dagger
#

it does it's job

stark salmon
#

I dont know what to pass to the LootContext

frigid ember
#

people use eclipse u know

brisk mango
#

noob devs use eclipse

boreal tiger
#

arguing about IDEs is stupid

torn robin
#

can you try using null?

frigid ember
#

so it must be worth something

brisk mango
#

its not stupid

stark salmon
#

ok

boreal tiger
#

stop gate keeping

split oxide
#

it does it's job
@tiny dagger yes

keen compass
#

@brisk mango that isn't quite accurate

boreal tiger
#

you have no idea what youre talking about @brisk mango

marsh nova
#

Eclipse is fine

manic bluff
#

u can't use null as a location

stark salmon
#

but then how does populateLoot know which table to use

manic bluff
#

it's not null

torn robin
#

LootContext != LootTable

brisk mango
#

eclipse is generally known as really bad IDE, people used eclipse before intellij came out, also intellij is very faster and way more stable IDE

torn robin
#

you're getting the loot from the loot table and it's asking for the context

brisk mango
#

wdym i have no idea what im talking about @boreal tiger

stark salmon
#

ohhhh

brisk mango
#

probably noobie plugin dev that uses eclipse defends it

marsh nova
#

Intellij uses more memory. No thank you. I need the spare performance.

stark salmon
#

makes sense

brisk mango
#

LOL @marsh nova weirdo

marsh nova
#

Maybe you have a very powerful laptop. I don't

naive goblet
#

IntelliJ requires more memory and doesn't have the simple overall project view like Eclipse has.

torn robin
#

new LootContext.Builder().killer(player).build()

#

you could try that if null doesn't work

boreal tiger
#

the gate keeping is real

marsh nova
#

The gate is busted wide open and temedy is left behind.

split oxide
#

whats gate keeping?

torn robin
#

and if that doesn't work or if it needs a specific entity then I doubt it would work

stark salmon
#
The constructor LootContext(Location, float, int, Entity, HumanEntity) is not visible
brisk mango
#

yeah, because private constructor

stark salmon
#

ok

torn robin
#

the activity of controlling, and usually limiting, general access to something.

#

new LootContext.Builder().killer(player).build()

boreal tiger
#

basically when someone wants you to use something because they think its better and limits you to that option

#

aka temedy's messages

brisk mango
#

well but everyone knows intellij is better

#

noobs

#

ยฏ_(ใƒ„)_/ยฏ

marsh nova
#

You only hem yourself in

boreal tiger
#

you're the only noob here @brisk mango

brisk mango
#

Ah plugin noobie developer that has no java knowledge is calling me an noob

#

interesting

marsh nova
#

temedy, the irony is that of all of us you have demonstrated the least knowledge.

brisk mango
#

you are an irony yourself

#

lol

marsh nova
#

Which is quite interesting.

#

I concur

naive goblet
#

temedy well it's a fact IntelliJ idea has more to give but if you're going to argue please do it factual. It's overall just annoying when someone is arguing with insulting arguments.

brisk mango
#

why would I do that when its litterly known that its better

marsh nova
#

I don't find it annoying. I find it amusing.

brisk mango
#

you can find the reasons urself

marsh nova
#

"its litterly known that its better"

naive goblet
#

Doesn't mean everyone can find it?

marsh nova
#

What a nice, well-reasoned statement.

hollow thorn
#

how would i make a minecart veihcle

boreal tiger
#
  • calling other people "noobie developers"
brisk mango
#

yeah i assume youre one of them @boreal tiger

hollow thorn
#

ooh im a nooooooooooooob

boreal tiger
#

I bet your chatcontrol plugin is good

frigid ember
#

Hey guys, how do I read this, I don't get how to read the parameters https://wiki.vg/Protocol#Map_Data

    PacketPlayOutMap map = new PacketPlayOutMap(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7)
marsh nova
#

Yes all of the developers here are noobs except the great temedy who has so much experience and is entirely logical.

naive goblet
#

@brisk mango be helpful. Tell the "noobs" why IntelliJ is the superior. Don't just say noob. It might not be obvious for them.

marsh nova
#

All hail temedy the magnificient.

brisk mango
#

Im not calling them noobs because theyre using eclipse

celest light
#

Hey, can you move the arguments to another channel not named 'help'? They aren't helping.

brisk mango
#

A248dnes v 4:35
public enum SomeEnum {
VALUE1,
VALUE2,
VALUE3
}
that is not a singleton
there are 3 instances of SomeEnum

#

I think youre missing some java knowledge here @marsh nova

marsh nova
#

That's correct

torn robin
boreal tiger
#

our lord and saviour temedy has 3 "auto message" plugins and calls other people "noobies"

marsh nova
#

SomeEnum is not a singleton.

brisk mango
#

Wow is that really correct?

#

3 instances of SomeEnum?

marsh nova
#

There are 3 instances of that class.

brisk mango
#

HAHAHHAHA

marsh nova
#

You couldn't get that right.

brisk mango
#

actual noob

marsh nova
#

You didn't know what a singleton was.

torn robin
brisk mango
#

Yeah I did

naive goblet
#

^

brisk mango
#

you didnt

torn robin
#

just wanted to point that out

marsh nova
#

You thought that #equals produced different true-false results than == for enums.

boreal tiger
#

@brisk mango love your 30000 nested if statements on your plugins

naive goblet
#

It's not really an instance. an enum contains enum elements or fixed constants

marsh nova
#

Quite disappointing.

boreal tiger
marsh nova
#

They are technically instances of the enum class.

brisk mango
#

it doesnt have the same result, in the first place the equality operator is faster, in the second place its safer at compile time, its safer at run time, and it prevents null pointers
@marsh nova

#

this is an explanation why

#

Very shit code @boreal tiger

boreal tiger
#

its yours

#

taken from your plugin

marsh nova
#

It does have the same result. This has been explained. #equals uses the same code as == in the implementation.

brisk mango
#

i dont have any plugins

boreal tiger
#

funny

brisk mango
#

those are very old

marsh nova
#

That's a big L for temedy the magnificient.

torn robin
#

=='s should be used over .equals for enums

vernal spruce
#

exposed

boreal tiger
#

old?

subtle blade
#

Jan 17th, 2020

boreal tiger
#

posted 3 months ago

#

๐Ÿคฆโ€โ™‚๏ธ

naive goblet
#

temedy isn't bad. In fact he is really good at Java ngl.

#

Im srs

vernal spruce
#

boy ur getting called out bad ๐Ÿ˜‚

marsh nova
#

MSWS, we talked about that a while ago, I said that I preferred ==, but #equals was fine, however temedy insisted that #equals was wrong.

boreal tiger
#

very good indeed. I love his nested if statements

frigid ember
subtle blade
#

equals() isn't inherently wrong, but when it comes to comparing constants, use ==

silk bane
#

@torn robin you're completely right, but because of the jvm, the performance difference is negligible

subtle blade
#

equals() defaults to just ==

torn robin
#
@Phaze https://github.com/dmulloy2/PacketWrapper/blob/master/PacketWrapper/src/main/java/com/comphenix/packetwrapper/WrapperPlayServerMap.java

I strongly recommend using PacketWrapper
frigid ember
#

But how do I read that wiki though

torn robin
#

what isn't clear about the wiki?

brisk mango
#

Its actually not only about performance, but its about that using == on static finals is a common practice @silk bane

torn robin
#

Map Data is ID 0x27 (byte value), its state is Play and it's bound to the client

marsh nova
#

It is common practice to also use enum.equals, but temedy insisted it was incorrect.

brisk mango
#

Also, 3 constants are not 3 instances @marsh nova

torn robin
#

it has many fields each with different uses, the Map ID, Scale, etc.

brisk mango
#

Of a enum

#

W/e

marsh nova
#

On the contrary, enum constants are instances of that enum class.

frigid ember
#

@torn robin how do I know what all this stands for?

marsh nova
#

Otherwise they wouldn't be type-safe.

frigid ember
#
    PacketPlayOutMap map = new PacketPlayOutMap(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7)
torn robin
#

That's why I recommended using the PacketWrapper

frigid ember
torn robin
#

it allows you to create a new mappacket with easier argument names

marsh nova
#

Yes, PacketWrapper is very good for starting with packets

#

I recommend it

#

The method names are readable and understandable if you are new to using packets

celest light
#

I'm looking for a way to store some information between commands.

In this case, I've got one command to create a 'target' , and another to spawn a wave of zombies trying to attack that target. Where do I put the 'target' id (or reference) so I can get it in the second command call?

If there's a guide for this kind of thing, a link to that would be great too.

pastel condor
#

I mean you could create a static variable in the main class?

celest light
#

Oh yeah. Static stuff feels a little ugly but appropriate I guess.

vernal spruce
#

or have the method spawning the zombies with a target player parameter?

naive goblet
#

ugly?

vernal spruce
#

spawnZombies(Player target) to simply call it?

celest light
#

There's just usually soem gotcha with static stuff. Threading, or ... in htis case, probably wouldn't stick around through a server restart.

pastel condor
#

then store it in a file

#

on the disk

naive goblet
#

If you're going to save a reference on main make a getter and a setter perhaps?

celest light
#

@vernal spruce Sure, that's how I have it but I'm not sure how to get the target on the second command call.

#

This isn't so much a Java question as a bukkit/spigot question.

pastel condor
#

Player player = (Player) sender;

#

cast it

celest light
#

the second onCommand invocation won't have any knowledge of the pig created in the first one.

vernal spruce
#

first.. why you need the target on second call?

celest light
#

In minecraft, it looks like:
/createArena
/spawnWave

The arena call creates the target,

#

*arena command

#

and the wave command spawns a wave of attackrs.

naive goblet
#

why uppercase :/

pastel condor
#

then save it in a static hash map on the main class

naive goblet
#

dont do that

celest light
#

I'd like for my players to defend the same target against multiple waves, eventually.

naive goblet
#

encapsulate a hashmap then

celest light
#

(ok, but case isn't what I'm asking about here)

torn robin
#

donโ€™t make it static

vernal spruce
#

sounds more like a object focus

split oxide
#

im going to re-ask if thats ok, i made a custom enchant and i would like to add it to an enchanted book to add it later to a pickaxe or something, how would i do that/go about doing that?

vernal spruce
#

rather than method/variables

celest light
#

ok, static map is the simplest thing that might work. I'll go with that.

torn robin
#

@split oxide by custom you mean it's extending Enchantment right?

naive goblet
#

BRO

#

Don't make a static hashmap for it

frigid ember
#

@torn robin I'm so confused how to use packet wrapper, how do I send the packet to the player?

    WrapperPlayServerMap map = new WrapperPlayServerMap();
    map.setId(view.getId());
    map.setZ(10);
    map.setX(3);

    ((CraftPlayer) p).getHandle().playerConnection.sendPacket();
vernal spruce
#

this sounds more of a object problem rather than anything else

naive goblet
#

private Map<K, V> map = new LinkedHashMap<>();

public Map<K, V> getMap() {
  return this.map;
}
torn robin
#

@frigid ember how are you receiving packets?

split oxide
#

@torn robin i made a custom enchant by extending Enchantment, yes

torn robin
#

I would personally use protocollib but i'll check without

naive goblet
#

@celest light

torn robin
#

you might need to manually apply the lore but it should function as expected

split oxide
#

Thank you!

torn robin
#

๐Ÿ‘

sturdy oar
#

msws

celest light
#

@naive goblet Sure, but I might as well just keep it as a typed variable. The map isn't really adding anything:
private static LivingEntity target = null;

sturdy oar
#

are you the guy working in the anticheat plugin?

torn robin
#

that's not really the point zip

#

and yes

celest light
#

And I assume it needs to be static? I don't know the lifecycle of the plugin instance.

naive goblet
#

Why static jeez

torn robin
#

it doesn't need to be static nor should it

pastel condor
#

because static is nice

sturdy oar
#

is it hard to make anticheats? I've never tried

naive goblet
#

static will be kept it in memory and won't be gc'd for instance.

#

static is nice

#

lmao

pastel condor
#

thats why

#

you want it to stay

naive goblet
#

yes if you use it correctly

celest light
#

When does the plugin instance get destroyed and recreated?

naive goblet
#

Not like creating a static plugin instance.

brisk mango
#

static is never nice @pastel condor

torn robin
#

@sturdy oar it's hard to make one correctly

brisk mango
#

use dependency injections always for plugin instances

torn robin
#

the one I made doesn't have the best baseline but I've been able to improve it

sturdy oar
#

is NCP a good source to look at?

naive goblet
#

fierceeo constants, fine but else no we don't need it unless very specific stuff like the static block f.i.

torn robin
#

I haven't looked at it personally but it was decent for 1.8

#

its been updated iirc

celest light
#

I don't have a DI container in my itzg image, and not inclined to modify it to add one.

brisk mango
#

Singletons are never better than dependency injections, dependency injection is more testable/reusable, explicit cohesion and defined ordering of how classes are used

pastel condor
#

idk I just used it for my hash map though @naive goblet

brisk mango
#

static HashMap?

#

lol

celest light
#

@brisk mango only a Sith deals in absolutes.

pastel condor
#

yes

brisk mango
#

Never make collections static

pastel condor
#

static HashMap<String, Integer> addFriend = new HashMap<String, Integer>();

celest light
#

I'm not building in a DI container for my 40 lines of plugin code. DI is important, as is the rest of SOLID, but there's a time and place.

brisk mango
#

Wdym by DI container

torn robin
#

it's not that hard to use DI

#

??

brisk mango
#

like

naive goblet
#

No, that's why people should use it lol

brisk mango
#

private final Main instance;

public ClassName(Main instance) {
this.instance = instance;
}
#

how does this take time and place

#

so much better than using a singleton

pastel condor
#

nooo I use a static instance ```public class Main extends JavaPlugin {

private static Main instance;
public static Main getInstance() {
    return instance;
}```
naive goblet
#

jesus

marsh nova
#

Oh I think we went through static collections as well.

brisk mango
#

Read why not in my message above

marsh nova
#

There are some times where you might want to use a static collection, particularly if it's also final and immutable.

brisk mango
#

not if its final only

#

if its constant

naive goblet
#

^

marsh nova
#

Read what I said.

#

Final and immutable.

brisk mango
#

I dont know what immutable means

#

since im not native english speaker

naive goblet
#

I think he means stuff like strings ๐Ÿคท

marsh nova
#

Yet you claim to be an experienced developer.

split oxide
#

@torn robin i dont really know how to add it :]

torn robin
#

any code?

brisk mango
#

How does being not that good at english have to do with java knowledge? are you brain damaged @marsh nova

naive goblet
#

MSWS what's the issue?

torn robin
#

they want to add a custom enchant to a book

naive goblet
#

Ah NBT ?

torn robin
#

shouldnt need to use that

marsh nova
#

Immutable is frequently used in javadocs. It's common terminology. Any experienced java developer knows what "immutable" means.

split oxide
#
Player player = (Player) sender;
        ItemStack book = new ItemStack(Material.BOOK);
        EnchantmentStorageMeta esm = (EnchantmentStorageMeta)book.getItemMeta();
        esm.addStoredEnchant(ench, 1, false);
        book.setItemMeta(esm);
        player.getInventory().addItem(book);
``` something like this?
naive goblet
#

idk I mean it that way we can ensure the ebook contains the enchant

torn robin
#

EnchantmentStorageMeta should cover it

brisk mango
#

I mean

#

its not called immutable

#

its called a constant in java

#

retard

marsh nova
#

No, it's called immutable.

#

Strings are immutable; there's a basic example.

#

Immutable is a very common term any experienced Java developer would know.

sturdy oar
#

constant is in Kotlin

#

as a keyword

naive goblet
#

Kotlin is java

marsh nova
#

Java, I meant in Java

brisk mango
#

I mean i use terms in my language not in english language @marsh nova

pastel condor
#

kotlin is fake java

sturdy oar
#

xd

brisk mango
#

so that every experienced developer should know is not true

naive goblet
#

lmao it's the same

#

but yeah ig it's kind of fakish

marsh nova
#

I'm sorry if you're not an experienced Java developer temedy.

#

That's okay

#

You don't have to worry

torn robin
#

temedy that's like saying I don't know what a String is because english isn't my first language

frigid ember
#

Hey guys, if I'm making per player maps, will my server lag if every player has their own map?

split oxide
#

but if i run the command that gives me the book it gives error: class org.bukkit.craftbukkit.v1_15_R1.inventory.CraftMetaItem cannot be cast to class org.bukkit.inventory.meta.EnchantmentStorageMeta

brisk mango
#

this guy is just actually fucking incredible lmao, youre actually being like a kid that has no fucking idea what is he doing

vernal spruce
#

@frigid ember depends on what is inside

marsh nova
#

This is so funny.

sturdy oar
#

indeed

naive goblet
#

Phaze eventually if the Map contains like 100 elements

vernal spruce
#

skyblock uses per player world wich shouldnt matter much

naive goblet
#

but it should be pretty fine

marsh nova
#

๐Ÿฟ

split oxide
#

calm down temedy

torn robin
#

what code do you have @split oxide ?

split oxide
#
Player player = (Player) sender;
        ItemStack book = new ItemStack(Material.BOOK);
        EnchantmentStorageMeta esm = (EnchantmentStorageMeta)book.getItemMeta();
        esm.addStoredEnchant(ench, 1, false);
        book.setItemMeta(esm);
        player.getInventory().addItem(book);
``` something like this?

this

naive goblet
#

Map is a very good datastructure to control players etc

#

ok yeah enchanted books got their own meta

#

is that in 1.8 R3 as well?

torn robin
#

no

naive goblet
#

or 1.8.8

brisk mango
#

String is a java term not an term in a language @torn robin

naive goblet
#

no?

split oxide
#

1.15

naive goblet
#

aww rip

torn robin
#

is immutable not a java term

marsh nova
#

Immutable is a java term as well.

naive goblet
#

mswq it is

brisk mango
#

its not

#

constant is the right word for it

marsh nova
#

In face, immutable is in the String documentation.

#

Immutable is used all over javadocs.

#

Immutable objects help in concurrency-oriented programs.

torn robin
#

@split oxide you have to use ENCHANTED_BOOK not just BOOK

brisk mango
#

ah wait, you mean like final String string = "";

#

mk

marsh nova
#

No, final and immutable are different.

frigid ember
#

Why does my map sometimes do this?

    @EventHandler
    public void onMapInitialize(MapInitializeEvent event) {
    for (MapRenderer renderer : event.getMap().getRenderers()) {
        event.getMap().removeRenderer(renderer);
    }

    final WorldMap worldMap = (WorldMap) MinecraftServer.getServer().worlds.get(0).worldMaps.get(WorldMap.class,
        "map_" + event.getMap().getId());

    event.getMap().addRenderer(new CraftMapRenderer((CraftMapView) event.getMap(), worldMap) {
        int i = 0;

        @Override
        public void render(MapView map, MapCanvas canvas, Player player) {
        super.render(map, canvas, player);

        if (c.get(player) == null || i % 8 == 0 || i == 0) {// reduce lag
            for (int i = 0; i < worldMap.colors.length; i++) {
            worldMap.colors[i] = 0;
            }
            c.put(player, player.getLocation());
            map.setCenterX(player.getLocation().getBlockX());
            map.setCenterZ(player.getLocation().getBlockZ());
            mapUpdater.update(map);

        }

        i++;
        }
    });
    }
marsh nova
#

Final means the reference can't be re-assigned.

frigid ember
marsh nova
#

Immutable means the data stored in the object can't change.

#

For example, a final HashMap is final but mutable.

#

A non-final String is immutable but not final.

split oxide
naive goblet
#

Constant means the variable stores something that can't be changed and the variable itself can't be re-assigned as well. ;o am I right?

torn robin
sturdy oar
#

I think it means the value of the variable is already known at compile time

marsh nova
#

Yes, that's a better definition.

naive goblet
#

Hmm yeah and shouldn't be changed as well

split oxide
#

i will take a look, thank you

marsh nova
#

For example, public static final int FIVE = 5;

#

Math.PI is another example.

#

Those are constants.

naive goblet
#

obv

tiny dagger
#

Math.E

naive goblet
#

Math.L

tiny dagger
#

L from what?

naive goblet
#

for me :i

marsh nova
#

xD

sturdy oar
#

yeah there are 'true' final variables, and 'fake' ones,
final long time = 5 + System.getCurrentMillis(); is an example of fake one
while final long TIME = 25L is a true one

marsh nova
#

Both of them are final, but the latter is a constant.

sturdy oar
#

and that's where kotlin has its own keyword

#

I think java doesn't because it automatically recognizes it

marsh nova
#

Java doesn't have that keyword probably just because it's Java

naive goblet
#

Well I mean yeah probs. Well it might make it more clear faster which ones are constants and which ones aren't

sturdy oar
#

I have one question for you all:

#

I've been recently trying to implement various databases, I've looked at the most common ones, and I was shocked to find 'Oracle' at the first place in many different places. The weird thing is that I've personally never seen anyone using it.

#

Is it just not very used in the minecraft environment?

naive goblet
#

Idk

#

probably not very used in more places

vale slate
#

Oracle is a company, they for example "invented" MySQL

#

@sturdy oar

pine goblet
#

anyone know how to create custom mobs, I have the models already, I just dont know how to kind of put them in game

vale slate
#

if you want to make real custom mobs you'll need NMS, it depends on the way you implemented them

pine goblet
#

have you done them before

vale slate
#

Yep, probably my main business

pine goblet
#

ah perfect, any chance i could add you to a group with someone?

vale slate
#

sure

frigid ember
#

Hey guys, can someone help me, my maps are lagging out my server alot!

torn robin
#

Phaze you're doing something weird with maps

#

try deleting them all

silk bane
#

is there a timings API for spigot? i.e. can i measure things that my plugin does and have it show up on the timings report?

naive goblet
#

@frigid ember static map?

#

How many maps do you even have as well?

frigid ember
#

1

naive goblet
#

Static ?

#

And what is the k and v?

crimson cairn
#

I don't think static maps lag out servers?

frigid ember
#

We're talking the map items

#

Right

#

And not a java Map?

crimson cairn
#

oh, yeah

grand aurora
#

Anyone know how I can place a custom banner object? I want to use a custom design and place it using the api, but as far as I can tell I can only set the design on an ItemStack and have a player place it.

naive goblet
#

Idk if BannerMeta is a thing

grand aurora
#

It is, but I have to set it on an ItemStack

#

And I need to be able to place it using a location

storm vessel
#

Does anyone know what file contains data about villagers?

naive goblet
#

@crimson cairn Maybe not lag out but it exist other reasons why it shouldnโ€™t be used. Especially in generics.

naive goblet
#

@storm vessel why do you need it?

grand aurora
#

Thanks

storm vessel
#

One of my devs fucked with the world files and now villagers are gone

#

I have backups from a few days ago but I don't want to roll everything back, just the villagers

naive goblet
#

Hmm should maybe be in the regions but I am extremely unsure

storm vessel
#

Just found out that he deleted the region file

#

That would probably do it

naive goblet
#

Yeah

keen compass
#

also resets the chunks in that region file as well

#

but hey, if it works for you, then I guess no need to worry XD

naive goblet
#

I mean that dev seemed to be experienced ๐Ÿค”

#

Anyone knows the amount of armor stands in a chunk to make the performance bamboozle?

frigid ember
#

guys how to get the UUID of a mob

#

i downloaded the plugin ultimate mob head fork but when i get chicken head i get steve head named chicken head

naive goblet
#

Entity#getUniqueId

frigid ember
#

how to get the uuid of a chicken to put it

#

Entity#getUniqueId
@naive goblet what that

naive goblet
#

send ur current code

frigid ember
#

b0b18a7e-49af-452e-afae-56554ac259d1

naive goblet
#

huh

#

code

#

not uuid

frigid ember
#

im not doing a plugin

#

i have trouble with a plugin i dwonloaded

naive goblet
#

ah

#

what's the issue, can you specify?

#

give it more context

frigid ember
#

when i kill a chicken i dont get the chicken head

#

i get steve head named chicken head

#

its the only head with a problem

vernal spruce
#

is the version you use,supported on the plugins page?

bitter vine
#

If I get banned, but I have put a plugin on spigot, where will go that plugin?

#

will it remain but not editable?

silk bane
#

don't get banned

bitter vine
#

I asked for delete my acc, but no one has anymore replied me

#

so i try to get banned, so you delete my acc..

tiny dagger
#

your name sounds like it's a reason alone to get banned imo ๐Ÿ˜‚

bitter vine
#

(I read the thing of ban for multiple accounts after I created my second)

#

so I need to delete it

#

Some staff that helps??

silk bane
#

how did you ask for it to be deleted?

bitter vine
tiny dagger
#

just report your second account

bitter vine
#

@tiny dagger I sent an email and I wrote it here

#

heeeeeeeeelpppppppppp meeeeeeeeeee plzzzzzzzzz

#

I would like to post my plugin

naive goblet
#

Just do it?

tiny dagger
#

those can take up to 1 month lol

bitter vine
#

but idk if(if they ban me for multiple accounts) the plugin will remain but I won't be able to modify it

frigid ember
#

why is the default walk speed 0.2000000149011612 and not 0.2 ๐Ÿ˜‚

#

oh

#

ok

tiny dagger
#

yeah thats called

#

float inaccuracy

frigid ember
#

oh yeah floats..

velvet scaffold
#

can someone help me? I installed spigot and it has somehow reset my world files for the nether

tiny dagger
#

or something like that

#

do you have backups?

velvet scaffold
#

i just tried installing from my backup but it isnt doing anything

tiny dagger
#

check region file

#

see if everything is there

velvet scaffold
#

im gonna need u to explain really carefully

#

what should be there

tiny dagger
#

okay region file is what keeps your chunk data