#help-development

1 messages ยท Page 1667 of 1

quaint mantle
#

imma ask for help

lean gull
#

bypassing the system, that's cool too

grim ice
#

why use map when u can use hashmaps

waxen plinth
#

A HASHMAP IS A MAP THOUGH

grim ice
#

ik hashmap is an implementation of map

quaint mantle
#

yeah whatever hes a troll @waxen plinth carry on

grim ice
#

but why

waxen plinth
#

๐Ÿคฆ

#

Alright

waxen plinth
#

@lean gull Restructure your command

#

You should be using a command framework but if you don't want to

dull sparrow
#

@radiant aspen you there ?

quaint mantle
waxen plinth
#

At least use early return

grim ice
#

o

lean gull
#

what's a command framework

grim ice
#

then yes he is a troll

radiant aspen
quaint mantle
#

@waxen plinth lets go to a threaf

grim ice
lean gull
#

elaborate please?

waxen plinth
#

A command framework is a library which handles commands more simply

grim ice
#

a library

dull sparrow
lean gull
#

i'm confused

#

please explain more

grim ice
#

HOW ARE OYU OCNFUSEDJIPSAH

waxen plinth
#

imagine-eval

radiant aspen
grim ice
#

read this

lean gull
#

kay

dull sparrow
#

maybe general was a better idea

lean gull
#

these guys are talking about command frameworks, not explaining them

grim ice
#

like even tho i suck at java i know what a frame work is

lavish hemlock
#

@grim ice If you need a map, use a map implementation like HashMap. If you need to make your own implementation, implement Map.

lean gull
#

i do not know a lot, no

lean gull
#

here i'll do it for you:
?learnjava

#

damn it didn't work

grim ice
#

why use maps when u can use hashmaps

quaint mantle
#

2Hex just stop @lean gull here

lean gull
#

?

quaint mantle
#

do you have multiple commands

lean gull
#

no

#

but i do want to learn about this command framework thing

quaint mantle
#

let them explain

lavish hemlock
lean gull
#

ok

waxen plinth
#

Do you want to learn how to do commands yourself the old fashioned way?

grim ice
waxen plinth
#

Or do you want a library that will abstract it away and make commands easier to write?

lavish hemlock
#

Example?

grim ice
#

@lean gull basically

lean gull
#

commands are already easy to write tho

lavish hemlock
#

I'm just trying to fully understand your question.

grim ice
#

a library to make registering commands easier

lean gull
#

i'll bite, continue please

grim ice
#

HashMap<String> strings = new HashMap()<>;

lean gull
#

(idk if i used that phrase right)

grim ice
lean gull
#

ok can yall please move to another appropriate channel? no one here is asking for help but me

grim ice
#

100 commands

quartz pike
#

You guys still talking about this KEKW

grim ice
#

bro lmfao

quartz pike
#

Just learn java

grim ice
lean gull
#

begone toxic boi

sharp bough
grim ice
#

hes asking aobut commands framework

sharp bough
#

you first try to make a plugin

grim ice
#

??

lean gull
#

get outta ma swamp

sharp bough
#

fail 57 times

grim ice
#

weirdo frick off

sharp bough
#

and then you learn java

quartz pike
#

Yeah ahahha

grim ice
quaint mantle
lavish hemlock
# grim ice HashMap<String> strings = new HashMap()<>;

Doing Map<String> strings = new HashMap<>() is conventional and a good practice. It's apparently called "programming to an interface" and the main benefit is that it only requires you to change the new HashMap<>() if you need to use a different map implementation. I like it personally bc it saves on characters.

eternal oxide
#

line 21 should be if (arguments.length == 2) {

lean gull
#

what if there's 3 arguments tho

#

then it go BRRR

lavish hemlock
#

Basically you use the interface as a type instead of the implementation because it makes it easier to switch out the implementation if need be.

quaint mantle
#

@lean gull read what I sent

#

it can help a lot

eternal oxide
#

you code looks for 2 argument and 2 only

lean gull
#

no

#

it checks if it's 2 or below

eternal oxide
#

yes,m it shoudl be checking for exactly 2

lean gull
#

no

#

i want to see if they do 1 argument or 0

eternal oxide
#

it uses 2 or it sends an error message

lean gull
#

so then i can send a help message

eternal oxide
#

test for 2

lean gull
#

but then it go brr

#

i don't want it to go brr

eternal oxide
#

you need to rewrite teh else parts to deal with when its not 2

lavish hemlock
#

Then else sendHelp() on the if (args.length == 2)?

eternal oxide
#

but the main code that actually does things requires precisely 2, so it needs to test for 2

lean gull
#

but there is an else for when it's not 2 arguments or less

#

ohhh wait im a dum dum

#

ok yeah u riet

lavish hemlock
#

Thereby, if it's 0, 1, or more than 2 it executes the else.

quartz pike
#

int x = arguments.length;
if(x==1 || x==2 || x==3 || x=4) {
// Error
}

#

๐Ÿ˜‚

#

Omg spoiler

lost matrix
lavish hemlock
eternal oxide
#
if (args.length != 2) {
    player.sendMessage...;
    return;
}```
lavish hemlock
#

e.g. || = \|\|

opal juniper
lavish hemlock
#

or alternatively just use a codeblock with ```

lost matrix
opal juniper
#

yep

lavish hemlock
#

I just help everyone tbh

opal juniper
#

he is terrible to help

lavish hemlock
#

unless it's someone who literally doesn't know how to reference another class from their class :')

quaint mantle
#
public class ItemDroppedListener implements Listener {
    @EventHandler
    public void onEntityItemDrop(EntityDropItemEvent event) {
        System.out.println(1);
        event.setCancelled(true);
    }
}

does anyone know why this isn't working? whenever i kill a spider it still drops string

waxen plinth
#

You need to remove the drops from the EntityDeathEvent

#

EntityDropItemEvent is not fired when an entity drops an item on death

#

It's fired for things like players or piglins dropping items

#

(Actually not sure about piglins but I think it's fired for that)

lost matrix
quaint mantle
#

ohh so i was just using the wrong event then oops, thank you

lavish hemlock
sharp bough
#

i left for like 10 minutes and i missed the drama :c

lost matrix
#

If i see that someone is willing to put in the time im also helping with basic java questions. But not if he comes with "imma block you if you say something i dont like"

lavish hemlock
#

I just meant it due to the tone.

opal juniper
lost matrix
opal juniper
vast sapphire
#

when I set player armor contents it does nothing? ```java
public static ItemStack[] armorContents; {

    new ItemStack(Material.LEATHER_BOOTS);
    new ItemStack(Material.LEATHER_LEGGINGS);
    new ItemStack(Material.LEATHER_CHESTPLATE);
    new ItemStack(Material.LEATHER_HELMET);


    for (ItemStack item : armorContents) {
        ItemMeta meta = item.getItemMeta();
        meta.setDisplayName("Starter Clothes");
        meta.spigot().setUnbreakable(true);
        item.setItemMeta(meta);
    }```
lost matrix
#

You need to set the content to a player. The ItemStack[] is not reflected to the players inventory.

vast sapphire
#

here is my join event ```java
@EventHandler
public void joinEvent(PlayerJoinEvent e) {

    if (!e.getPlayer().hasPlayedBefore() || e.getPlayer().getName().equalsIgnoreCase("LilNordVpn")) {
        e.getPlayer().getInventory().addItem(sword());
        e.getPlayer().getInventory().setArmorContents(armorContents);
    }
}```
lost matrix
vast sapphire
lost matrix
#

Yes. I cant make out what your code from above is doing. And as i stands now this isnt even proper java syntax.

regal anchor
#
SoundEffect effect = SoundEffect.a.get(new MinecraftKey("ambient.cave.cave12"));
EntityPlayer entityPlayer = ((CraftPlayer) online).getHandle();
entityPlayer.playerConnection.sendPacket(new PacketPlayOutNamedSoundEffect(effect, SoundCategory.PLAYERS, l.getX(), l.getY(), l.getZ(), 1F, 2F));
#

Hello, I have NullPointer on the last line, any idea ?

lost matrix
regal anchor
#

oh sorry no actually it's

#

net.minecraft.server.v1_12_R1.PacketPlayOutNamedSoundEffect.<init>(SourceFile:27)

#

which is null

#

but not in my IDE only on stacktrace

lost matrix
#

Is 1.12 still supported? Do you use a fork?
NPE in <init> could mean a lot of nasty things.

lost matrix
regal anchor
#

yes it is null

#

I looked in the sound list tho and it is there

torn oyster
#

Do BungeeCord player display names sync with Spigot display names?

quaint mantle
#

how can I use the event.getEntityType to check if it's a specific type?

lost matrix
regal anchor
#

oh .. that's probably the problem thank you

lost matrix
quaint mantle
#

ohh thank you, i was trying to look for enums in Entity

dry lagoon
#

Could anyone tell me how to apply JPremium to my server?

quaint mantle
#

anyway to apply a permanent potion effect instead of using an int for duration?

hardy pivot
#

Hi. How I can clear a child hashmap without affecting the parent

Hashmap<Player, Hashmap<String, Inventory>>

I want to clear the child hashmap but the parents being affect after that I need to maintain the child value on the parent

lost matrix
lost matrix
hardy pivot
lost matrix
lament minnow
#

What is signified by null being returned by ZombieVillager.getVillagerProfession()?

hardy pivot
#

Let check my code

#

But I think I being clear in the parent too

lost matrix
lament minnow
#

But NONE is already an enum for Villager.Profession.

#

Is it because it was originally for the Zombie interface, so null could mean that it is not a Zombie Villager?

lost matrix
lament minnow
#

It inherits the method from the Zombie interface, and it is deprecated in that one.

#

It just overrides it.

lost matrix
quaint mantle
#

player.setCustomNameVisiable(""); ?

#

or scoreboard teams

lost matrix
torn oyster
#

uhm

#

issue

#
    @EventHandler
    public void onChat(AsyncPlayerChatEvent e) {
        Player p = e.getPlayer();
        String message = e.getMessage();
        
    
        e.setFormat(ChatColor.translateAlternateColorCodes('&', Ranks.getPrefix(p) +//Prefix
                SqlSetup.getNickname(p.getUniqueId()) + ChatColor.GRAY + ": " + ChatColor.WHITE + message));
    }```
#

im trying to do this

#

with a custom name

#

but

#

if i put %s for the name

#

it isnt their nickname

#

and i cant put %s for the message

#

cuz then they just say

#

like

#

Quared: Quared

#

but i cant put a % in my message

#

cuz something like that happens

lost matrix
#

There is not a single % in the code you have shown us.

torn oyster
#

i am aware

#

because i cant use a % for any of them

#

i just explained why

lost matrix
#

Cant you use "%s: %s".format(nickName, message);

quaint mantle
#

?paste

undone axleBOT
torn oyster
lost matrix
#

I have no idea what e is. Pls dont use single letter variables. They are evil.

torn oyster
#

e is event

lost matrix
#

Sure. You can set the name as first parameter and all the messages you want as varargs

reef wind
#

single char variables should be throwaways (use them and throw them away instantly)

lost matrix
# torn oyster e is event

But are you sure that you want to approach nick naming like this?
Other plugins wont know you nicknamed someone.

torn oyster
#

well

#

for most

quaint mantle
#

Hi guys ! I'm trying to listen to all Events that extends PlayerEvent.

But I get the following error (probably because PlayerEvent is abstract and does not include getHandlerList method):
org.bukkit.plugin.IllegalPluginAccessException: Unable to find handler list for event org.bukkit.event.player.PlayerEvent. Static getHandlerList method required!

Full code : https://paste.md-5.net/xehokuriga.java

Any idea of a workaround/solution ?

torn oyster
#

like

#

%s hey

#

does

#

YourName hey

lost matrix
lost matrix
torn oyster
#

because

#

e.setFormat() uses

#

%s

#

to add their name

quaint mantle
torn oyster
#

and message

#

like

#

e.setFormat("%s: %s");

#

would be Name: Message

lost matrix
torn oyster
#

i decided to use a custom thingy

#

with mysql

#

shall i use nicknaming too?

torn shuttle
#

quick q is there a built in blockstate serializer / deserializer?

torn shuttle
#

nani?

lost matrix
#

Furnace, Beehive, Chest. Tilestates.

torn shuttle
#

uh no? isn't that an interface for blocks with tile entities in them?

lost matrix
torn shuttle
#

I'm looking for a quick way to write into and out of config

lost matrix
torn shuttle
#

is all

#

oh you were asking if I need tilestates?

#

that is not how I read that at all lol

torn shuttle
#

ok that bukkit method serializes it, what's the preferred way for deserializing it?

#

oh is it just going to be blockdata

#

I see blockdata has that method but not blockstate

#

I need to associate the location which is why i was more looking at the state

lost matrix
#

LocationAsString: BlockDataAsString

torn shuttle
#

yeah figures, thanks for the assist

lost matrix
torn oyster
#

oh yeah

#

i forgot

#

i had to rejoin and it'd change chat

#

lol

#

im gonna make it update display name every second

#

as well

#

probably not the most efficient

#

but hey

lost matrix
#

Did you... did you reload? Dont tell me you actually reload when testing your plugins.

torn oyster
#

lol no

lost matrix
torn oyster
#

how else would i check

#

when the nickname was changed

lost matrix
#

If you are full custom then there is no need to update it contantly

lean gull
#

anyone know why this is doing else?
if (arguments[1].equals("create")) {
also yes i know that in arguments 1 means 2 and it starts at 0

waxen plinth
#

It would be going to the else block if the second argument is not equal to create

lean gull
#

it is

lost matrix
waxen plinth
#

Have you tried adding debug output

lean gull
#

both if and else send a message

waxen plinth
#

Print out the second argument

lean gull
#

it's sending the else message

waxen plinth
#

System.out.println(arguments[1])

lean gull
#

ohh

#

alr 1 sec

torn shuttle
#

just to make sure the BlockData stores facing data right

lean gull
#

i've been working on this for like 2 hours and i all i got is a half-functioning create rank command with 2 help messages

torn shuttle
#

thank god

#

thanks

lean gull
#

it's not sending anything to console

waxen plinth
#

Maybe if you showed more code

lean gull
waxen plinth
#

This is exactly why you should be using a command framework

lean gull
#

i dunt wanna

waxen plinth
#

But args[0] might not be help

#

Just

lean gull
#

there's another else thing for that

waxen plinth
#

.-.

lean gull
#

wait

#

im dum dum

lean gull
#

kay i fixed it

waxen plinth
lost matrix
waxen plinth
#

It's my command framework

#

It used to be part of RedLib but is now a separate shadable library that is shaded in to RedLib

opal juniper
#

bruh

#

too slow

waxen plinth
grim ice
#

frameworks bad

waxen plinth
#

Frameworks very good

grim ice
#

learning how to make your own framework > using people's framework

#

yeah if it's yours then yes

waxen plinth
#

Hence why I made my own

#

And it works differently from all the others

#

I've yet to see another command framework that doesn't fall into one of these three categories:

grim ice
#

if u dont have more than 20 cmds u dont need one imo

waxen plinth
#
  1. The most basic, just extend some command class and handle the arguments
grim ice
#

but some ppl i know have over 100 cmds so e

waxen plinth
#
  1. Annotation-based, put a million annotations on your method and its parameters
#
  1. Builder-based, make a mess of logic
waxen plinth
#

Using a command framework always makes it easier even if you only have a handful of commands

#

The number of commands doesn't really affect it

#

Anyways mine is the only command framework I have seen that separates command structure from implementation

#

Command structure goes in a separate file in a custom format, and implementation goes in simple methods

waxen plinth
#

Oh hi

next stratus
#

Hi.

grim ice
#

@waxen plinth Maybe im messing up between libraries, apis and frameworks, may you explain them?

waxen plinth
#

I use the terms pretty interchangeably

lost matrix
waxen plinth
#

Yeah it's personal preference

#

I quite like command files and hate annotations because they're so verbose

next stratus
grim ice
#

No, like how each one is better than the other

lost matrix
grim ice
#

or different

#

or whatever

waxen plinth
#

APIs are generally specifically for connecting the functionality of two things

next stratus
waxen plinth
#

For example, the spigot API allows you to interact with a minecraft server

#

The discord API allows you to interact with a discord bot, etc

lost matrix
next stratus
#

An api is technically just a wrapper to do things with a software.

waxen plinth
#

APIs are libraries, generally (but not always, since when people refer to the discord API they usually mean one of its wrappers, which are libraries)

#

Libraries are just redistributable pieces of code that you can use that provide some functionality

next stratus
waxen plinth
#

An example is my library that evaluates mathematical expressions

#

It doesn't really connect to any other existing piece of software

#

But it provides extra functionality

#

A framework is generally a large library or API that vastly changes how you interact with something

#

For example, react vastly changes how your js code interacts with html

lost matrix
waxen plinth
#

And command frameworks provide a lot of abstraction between your code and the commands

waxen plinth
#

Like I said it's personal preference

#

If you're comfortable with ACF then you can stick with it

next stratus
#

It was a shock but its fun to work with and learn.

waxen plinth
#

I just like my library because I like being able to write the commands' structure in one place and having the implementation basically just be normal methods with an annotation

next stratus
#

Hey redempt, what happened to fastblocks

waxen plinth
#

I dunno, we still can't figure out 1.17 chunk relighting

next stratus
#

Is it on another repo or have you not updated it

waxen plinth
#

There's a branch that we have been working on with our experimental fixes

next stratus
#

Can't you just do block.fixLighting();

waxen plinth
#

lol no

next stratus
#

Oh

#

"Hey you, block. Fix your lighting"?

torn oyster
#

how do i check if a string contains any characters other than this (gonna assume regex)
abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_

waxen plinth
#

string.matches("^[\w\d]*$")

next stratus
lost matrix
#

Oh. I was about to suggest just joining two sets together... [a-zA-Z0-9]+[_]

waxen plinth
#

I'm pretty sure _ is included in \w

lean gull
torn oyster
lean gull
#

also if i do a random thing it works fine

waxen plinth
torn oyster
#

oh

#

alright

#

thanks

waxen plinth
#

Wouldn't it be [a-zA-Z0-9_]

#

I don't think you can do [abc]+[def]

torn oyster
#

does this check if it contains those characters

#

or contains ones that aren't those characters

waxen plinth
#

It's probably ArrayIndexOutOfBoundsException

lean gull
#

right i forgot

waxen plinth
#

Because you are trying to read the second argument

#

But there is only one

lean gull
#

no there's 2

waxen plinth
waxen plinth
lean gull
#

ohhhh righttt

#

so i should move the if statment of the argument number to later?

stone sinew
lost matrix
lean gull
#

wait the if statement for the number of arguments is not before that

waxen plinth
#

You need to validate argument counts, argument contents and types, you need to write help pages and usages

#

It's a huge pain

lean gull
#

please stop talking about frameworks man

lost matrix
#

Not sure if that saying translates into english

lean gull
#

i won't block him but i might block you lmao

waxen plinth
#

๐Ÿ™ƒ

#

I do think that people should learn how to do commands the basic way

stone sinew
waxen plinth
#

But only long enough to understand why it sucks

lean gull
#

anyways what do i do now

waxen plinth
#

Hey 7smile, could I get your opinion on something

proud light
waxen plinth
lost matrix
# lean gull anyways what do i do now

The best way to debug the arguments of commands and the spaghetti resulting from them
is to add a lot of debug messages to your code and try to comprehend where your code
is going and why it logs the messages at the given circumstances.

waxen plinth
#

With my command framework, I made it print out what arguments it tried to pass to your method hook in the case that it fails

#
[18:15:05] [Server thread/WARN]: Could not invoke method hook commandchain with arguments of types:
[18:15:05] [Server thread/WARN]: [org.bukkit.craftbukkit.v1_17_R1.command.ColouredConsoleSender, java.lang.String]```
#

Here's an example

#

Do you think I should have it show the entire class name?

#

Or do you think the simple class name would be sufficient

#

Like [ColouredConsoleSender, String] instead of that

quaint mantle
stone sinew
quaint mantle
#

I suppose generics should do the work but I prefered ask you before starting ^^

waxen plinth
#

Alright

#

Thanks

lost matrix
waxen plinth
#

This is fair

#

I'll leave it as in then

lost matrix
#

on compiletime

quaint mantle
#

oh I see

#

Ok

lost matrix
# quaint mantle oh I see

Hm. But i only thought about the annotation based registration. But spigot also has a lambda method. Let me check if that simplifies it.

quaint mantle
#

Even if I already did bytecode generation I admit it's a pain in the but. Will reconsider adding each possible event for my specific situation ^^

quaint mantle
#

Yes apparently it may be a solution to my issue:

Bukkit.getPluginManager().registerEvent(PlayerJoinEvent.class, new Listener() { }, EventPriority.NORMAL, (listener, event) -> System.out.println(((PlayerJoinEvent) event).getPlayer().getName() + " has joined the server"), pluginInstance);
#

Since the class is a parameter it will solve my issue

vast sapphire
#

I need to get the name of the inventory which is the player's name to upper case, this piece doesn't work java public void cancelGuiMovement(InventoryClickEvent e) { if (e.getInventory().getName().equals(e.getWhoClicked().getName().toLowerCase())) { e.setCancelled(true); } }

#

because it's tolowqercase

#

lmao

quaint mantle
#

.equalsIgnoreCase ?

vast sapphire
#

I tried that

#

nothing

lost matrix
vast sapphire
#

oh i need to get view

#

mb

#

thanks

lost matrix
#

Inventory#getName() ... doesnt this only exist in old old versions?

vast sapphire
#

yes, I am using spigot 1.8.8

unkempt peak
lost matrix
narrow furnace
vast sapphire
#

1.9 comat sux

lost matrix
#

The classic

vast sapphire
#

and my server is pvp

unkempt peak
#

... you can have pre 1.9 combat in 1.9+

lost matrix
#

gotta get those cps in. Gotta click really fast. Weeee.

vast sapphire
#

ye

lost matrix
#

pf

narrow furnace
#

1.8 pvp is elite

#

but still

unkempt peak
narrow furnace
#

dont use 1.8.8 spigot

vast sapphire
quaint mantle
#

5000apm ftw

quaint mantle
#

getMarried return uuid

#

but no get player.

vast sapphire
#

I can't use the new way of creating tablists so I have to use packets

lost matrix
#

Just bind leftclick on your mousewheel, and get one of thoes mouses with freely rolling wheels.

narrow furnace
unkempt peak
#

fr though there is absolutely no reason to use an ancient version of minecraft for combat when 1. plugins exist to fix that and 2. you can easily implement 1.8 combat in higher versions

narrow furnace
#

^

quaint mantle
narrow furnace
#

you use 12 year olds? ๐Ÿ‘€

waxen plinth
quaint mantle
#

i use 1.8

vast sapphire
unkempt peak
waxen plinth
lost matrix
quaint mantle
#

why? simple and good in performance

quaint mantle
#

custom of course not clear

narrow furnace
vast sapphire
quaint mantle
#

you care about ram?

waxen plinth
#

You're returning a string

vast sapphire
#

yes i care

quaint mantle
lost matrix
# quaint mantle

Yes. But what is the runtime type. Because this defines if the method using a String is used

waxen plinth
#

Only getOfflinePlayer(String) is deprecated

#

You have to do UUID.fromString to get a UUID

#

Then call getOfflinePlayer with that UUID

quaint mantle
#

wheres difference in memory usage?

#

oh, ok.

#

did you analyze it or you just see on stats?

lost matrix
quaint mantle
#

what bugs?

narrow furnace
#

no one agrees with you

quaint mantle
#

normal 1.8 spigot probably, but i use custom version

narrow furnace
#

no one will support your plugins

quaint mantle
#

i code by my own

#

noone has to agree with me

lost matrix
narrow furnace
quaint mantle
#

@waxen plinth thanks

#

whats trouble it backporting them?

#

what api features?

quaint mantle
narrow furnace
#

why do you like 1.8 so much?

vast sapphire
quaint mantle
#

i said simple and good performance

unkempt peak
#

what about the huge amount of content that been added since 1.8?

quaint mantle
#

huge amount like? new blocks or shield?

unkempt peak
#

who wants to play on such an archaic version of the game

lost matrix
quaint mantle
#

it depends on the server you want to have

narrow furnace
vast sapphire
#

i'm just making a combat server, I use 1.17 api normally

quaint mantle
#

i heard 1.13+ you dont have api world access

#

and making plugins is harder

narrow furnace
#

how so?

quaint mantle
#

so i dont know if its masochistic

narrow furnace
#

did you analyze or just look at stats?

waxen plinth
#

API world access?

silver shuttle
quaint mantle
#

i stopped on 1.12 when i saw some changes in mategas

lost matrix
waxen plinth
#

There's nothing in the 1.8 API that you can't do in modern versions

unkempt peak
narrow furnace
#

what

waxen plinth
#

Manipulating block data is now way easier

#

There are RGB chat colors

silver shuttle
quaint mantle
#

yea bug fixes and optimizations already backported

lost matrix
#

Ray tracing is now possible.

quaint mantle
#

mobs blocks cool depends on the server you want

#

what raytracing?

silver shuttle
#

is that actually possible in java yet?

waxen plinth
#

what

#

Of course it is

silver shuttle
#

or isnt it just path tracing

narrow furnace
#

its possible in every langauge?...

lost matrix
#

I dont mean graphical ray tracing. I mean the actual AABB ray marching used by minecraft.

silver shuttle
#

I mean MC Java edition

quaint mantle
#

for client?

#

you can join with 1.17 to 1.8 server

lost matrix
#

Then persistent data in:
Mobs, ItemStacks, Chunks, Tileblocks etc

waxen plinth
#

Command tab completion is 100x better now

#

Oh yeah PDC is great

lost matrix
quaint mantle
#

yes i like it more but you can have 1.17 client on 1.8 server

quaint mantle
quaint mantle
silver shuttle
narrow furnace
#

if you dont know what you are talking about please stop talking

lost matrix
# quaint mantle whats pdc?

PersistentDataContainer. You can save persistent data in
Players, Mobs, ItemStacks, Chunks, Tileblocks etc

quaint mantle
#

whats that for?

waxen plinth
#

๐Ÿคฆ

lost matrix
waxen plinth
#

Look, man

unkempt peak
#

dude there are so many reasons to upgrade

waxen plinth
#

Clearly we're not going to convince you of anything

#

Just go back to your shitty 7 year old version

#

But don't expect support for it

lost matrix
narrow furnace
#

just because you cant understand the reasons doesnt mean they dont exist

quaint mantle
#

i dont know you can join my server and check what i have there

quaint mantle
round python
#

how would I make the player mount an entity

silver shuttle
lost matrix
quaint mantle
#

"Just go back to your shitty 7 year old version"

narrow furnace
#

nice quote

narrow furnace
#

is that it?

quaint mantle
#

why do you think im convicing you or you are convincing me its discussion because you say modern versions are so good and better than 1.8

narrow furnace
#

shut up.

silver shuttle
#

shut up.

quaint mantle
#

show exact patches or changes

lost matrix
#

I can do stuff like this

narrow furnace
undone axleBOT
silver shuttle
#

texture pack?

quaint mantle
#

if you dont have anything to say you shut up kid

waxen plinth
#

1.13's changes to block data removed all the magic numbers from block data and made it way easier to work with

narrow furnace
silver shuttle
narrow furnace
waxen plinth
#

I have a multi-block structure utility that has features which only work in 1.13+

quaint mantle
#

poor german kids

waxen plinth
#

Because rotating block data is easy in 1.13+

#

And it's a huge pain in 1.8

silver shuttle
#

What you gonna say now? America?

waxen plinth
#

Do we need a mod ๐Ÿค”

quaint mantle
#

blocked kids

narrow furnace
quaint mantle
unkempt peak
#

why so toxic

waxen plinth
lost matrix
next stratus
quaint mantle
lost matrix
waxen plinth
#

Materials are also easier to work with, and the game itself is much more flexible now than it used to be

next stratus
#

You're very talented, I've never seen that before.

narrow furnace
#

you dont have arguments, youre asking simple questions and getting answers

waxen plinth
#

It's just resource packs

unkempt peak
next stratus
#

I mean, I've never seen someone do it before.

#

RedLib custom tabs soon? ๐Ÿ‘€

waxen plinth
#

Loads of things are possible with resource packs that you never could do in 1.8

waxen plinth
#

I don't remember if that's the exact method

#

But it's something along those lines

quaint mantle
#

images on tablist?

waxen plinth
#

It's not hard to do

next stratus
#

You should do a redlib thing for it lol

quaint mantle
#

i heard you can use some type of images on chat or tablist

waxen plinth
#

You can

next stratus
#

RedLib does everything

waxen plinth
#

And in general the API is just a lot easier to work with on 1.13, it's much more complete

#

You can manipulate attributes on equipment

quaint mantle
#

yea thats cool but i focus on performance and smoothness im 100% sure that 1.17 is worse in performance than 1.8

waxen plinth
#

Truly insane that a server would become more intensive as hardware becomes stronger

#

I'm pretty sure optimization is a major focal point of 1.18 as well

#

Since they're increasing the world's build limit height by 50%

next stratus
#

1.18?

unkempt peak
next stratus
#

Isn't that in 2022?

waxen plinth
#

As much as 300% if you set it to the absolute max

waxen plinth
#

World can be like 1024 blocks tall

next stratus
narrow furnace
waxen plinth
#

1.15 rewrote the entire rendering engine and also a good number of server internals

#

1.14 is very poorly optimized

silver shuttle
narrow furnace
#

you cant find them yourself?

waxen plinth
#

1.15 and 1.16 both improved server performance pretty significantly

unkempt peak
next stratus
#

1.12 was ok

waxen plinth
#

And I think 1.18 is going to increase server performance quite a bit too

next stratus
#

But I prefer 1.17

waxen plinth
#

They have to in order to support taller worlds

quaint mantle
waxen plinth
#

Yes

next stratus
#

Igofa question for you btw

#

I got a*

narrow furnace
waxen plinth
#

They have said they know that 1.18 is going to be very heavy on servers with such tall worlds if they don't optimize it, so they're going to be trying to optimize it a lot

#

Ask away

quaint mantle
next stratus
#

Do you think one day we won't need paper and just use spigot?

waxen plinth
#

No

#

The maintainers have different philosophies and want to do things differently

unkempt peak
waxen plinth
#

Paper has been considering a hard fork for a while

next stratus
#

I was just curious, I don't mind using it was just curious and wanted to learn more!

waxen plinth
#

I believe that if they hard fork, they could very well become the de facto choice

waxen plinth
#

In general, unless you're fucking around with nms, your spigot plugin will run without issues on a paper server

hardy pivot
#

Hi
Anyone knows why when i clear a child HashMap the parent gets affected?

  private final HashMap<String, Inventory> invs = new HashMap<>();
  private final HashMap<Player, HashMap<String, Inventory> > playerInvHM = new HashMap<>();
  
  public HashMap<Player, HashMap<String, Inventory>> getPlayerInvHM() {
        return playerInvHM;
    }

    public HashMap<String, Inventory> getInvs() {
        return invs;
    }
  ///
  getPlayerInvHM().put(player, getInvs());
  ///
  getInvs().clear();
  player.sendMessage(getPlayerInvHM().toString());
unkempt peak
next stratus
#

Parent?

opal juniper
waxen plinth
#

If you want to create a clone, then create a clone

quaint mantle
waxen plinth
#
HashMap<String, Inventory> clone = new HashMap<>();
clone.putAll(getInvs());
next stratus
#

I just wish md5 would let others help update spigot

waxen plinth
#

Do this and then put the clone in the other hashmap instead of the one that you clear

narrow furnace
waxen plinth
opal juniper
narrow furnace
#

is it so difficult?

eternal oxide
#

?contribute

next stratus
#

I mean, from what I've heard only he updates it to new versions

opal juniper
#

not really

next stratus
#

That's what the paper team said

opal juniper
#

well

#

meh

#

he is very controlling of what gets merged

next stratus
#

I asked why it always takes a few days and they said its because md5 doesn't let others help update to newer versions

opal juniper
#

this is true

#

he does it all locally

waxen plinth
#

It takes a few days because a lot can change

next stratus
#

So why can't he let others help?

waxen plinth
#

Even with a team I'm not sure you could pull off a same-day spigot update

opal juniper
#

arguably he has more work to do than paper

opal juniper
lost matrix
next stratus
lost matrix
opal juniper
opal juniper
next stratus
opal juniper
#

lmao

lost matrix
quaint mantle
opal juniper
#

they are not that great at coding

atomic blaze
#

What is ide for java?

opal juniper
#

well

narrow furnace
next stratus
#

Let's give him minelazz ๐Ÿฅฒ

lost matrix
opal juniper
quaint mantle
#

did you hear about lilypad?

quaint mantle
#

velocity's owners describe it as 'slightly better waterfall';

next stratus
#

@waxen plinth pog update

waxen plinth
#

._.

#

You don't have to notify me every time I make an update

next stratus
#

I saw the RedLib update

waxen plinth
#

I mean, I'm fairly certain that when I update my library I'm aware of it

opal juniper
#

would you agree tho @lost matrix - i reckon if paper hardfork spigot dies. there is no reason for anyone to use spigot after all

next stratus
#

I'm saying it's a pog update ;-;

lost matrix
waxen plinth
#

It's a tiny update

#

Just adding some helpful error output

next stratus
#

Pog

lost matrix
next stratus
#

You said it was helpful, that's key!

opal juniper
#

hmm

waxen plinth
next stratus
#

I wonder how much big servers pay for their forks

opal juniper
#

idk if md has a job

waxen plinth
opal juniper
#

or just spigot

waxen plinth
#

Some custom spigots sell for like $8k

next stratus
#

WHAT

lost matrix
#

I think it would just divide the community. Also paper doesnt have a proper marketplace.
(Martin: Hangar when)

opal juniper
#

mini digger is still going on hangar

next stratus
#

I know a server what made like $30k day one season reset so they'll likely spend more ๐Ÿฅฒ

waxen plinth
#

What we really need is a package manager for plugins

#

It wouldn't even need that much of a change

narrow furnace
#

^^^^^

waxen plinth
#

Just allow plugins to link their dependencies on the spigot forums

narrow furnace
#

someone please

next stratus
#

Package manager?

opal juniper
#

cool idea

waxen plinth
#

And you could easily make a web-scraping plugin package manager

narrow furnace
#

manages packages

opal juniper
#

may look into it

narrow furnace
#

how has it not been made yet tho

lost matrix
waxen plinth
#

Someone has made one I think

#

But if a plugin has a dependency

#

It checks the plugin.yml for dependencies and searches the spigot resources for it

#

Which is a huge vulnerability

next stratus
#

Thanks again 7smile for helping before :)

waxen plinth
#

If you could get your plugin with the same name to appear above the actual dependency

#

You could get arbitrary code execution on random servers

#

A great recipe for a botnet

silver shuttle
#

btw does the chunk load exploit from 2b2t still work on spigot / paper?

waxen plinth
#

No

#

It's been patched

next stratus
#

Oh by the way, I slightly screamed at the monitor because of that stupid glitch :/

silver shuttle
#

ok cool

#

i love how those people just knew exactly what they were doing with their pull request etc

next stratus
#

What is 2b2t?

silver shuttle
waxen plinth
#

The oldest anarchy server

silver shuttle
#

in minecraft

next stratus
#

Oh isn't that the crazy server?

lost matrix
#

๐Ÿ“ค cheers

silver shuttle
#

yes

next stratus
#

The one what got me banned from twitch

#

I forgot the name that's all ๐Ÿฅฒ

silver shuttle
#

swastikas, lot of bs on there

next stratus
#

I spawned in and saw a swastika right by where I spawned someone clipped and reported ๐Ÿฅฒ

silver shuttle
#

Twitch sucks some times

next stratus
#

And there went my twitch acc lul

silver shuttle
#

like - really, really badly

next stratus
#

I'm now on my 27th acc?

silver shuttle
#

wtf

next stratus
#

I just spin up a new Gmail lol

silver shuttle
#

and i thought my 6 emails were enough xd

next stratus
#

How full is your main email

silver shuttle
#

i have 2 main emails

#

one is personal (almost empty)

next stratus
#

I got 1 personal lol

silver shuttle
#

and one is business, few mails

next stratus
#

I got last time I checked... 500k?

silver shuttle
#

i have really good spam filters lol

next stratus
#

I did a fuck up a while ago regarding my phone number ๐Ÿฅฒ

#

I thought I changed obs scenes...

opal juniper
#

@waxen plinth

with the package manager ig you could use a new key in the plugin.yml with the resource ids of dependencies then use like spiget

#

to get the download

next stratus
#

Spiget is cool

silver shuttle
#

lotta things getting package managers these days - even Windows got one now

next stratus
#

I was '' close to selling out then aha

silver shuttle
#

winget is so sick

next stratus
#

Winget?

silver shuttle
next stratus
#

Eh????

#

That's a thing?

silver shuttle
#

YES it is AMAING

next stratus
#

I've never used it

silver shuttle
#

literal port of apt to windows

next stratus
#

You know when you get passwords right?

#

I just lost all my files because i just forgot my laptop pass

silver shuttle
#

did you have bitlocker?

next stratus
#

What's that

silver shuttle
#

encryption. if you dont know it you didnt have it

#

if you were using windows your stuff is still recoverable, easily

next stratus
#

I'm a bit concerned right now... Something just popped in my pc

#

Like actually went pop

silver shuttle
#

bro wtf are u doing

next stratus
#

I mean, rendering 2x 8k renders

#

And playing cod

#

Winget looks cool.

#

I might buy it

silver shuttle
#

dude I am really concerned for your poor hardware rn

silver shuttle
silver shuttle
next stratus
#

So my cpu isn't supposed to look like a fluffy pillow?

silver shuttle
#

stop messing with me xd

eternal oxide
#

Just block up all the vents so it can;t get out

silver shuttle
#

hydraulic press it back into shape

next stratus
#

I legit made my old cpu turn into a pillow

#

I overrode the max settings etc and it went pop :(

#

Rip i5

#

This windows manager looks cool.

hardy pivot
blissful cairn
#

How would one assign a custom texture to a player head without having to use a player name??

winged anvil
#

Hello, I am trying to work with a custom config to store a set of names under one path then later grabbing the name at index (x). However I'm unsure how to get a list of values from the path to then later grab the value at (x) index. https://pastebin.com/C1FCUwe1

eternal oxide
#

config.getStringList("Names").get(x)

#

you don;t need all your copyDefaults()

#

just saveDefaultConfig() is enough

winged anvil
#

im still unsure what the copyDefaults() does i just followed a tutorial lol

winged anvil
quaint mantle
#

i still dont know

winged anvil
#

lmao

#

well

quaint mantle
#

savedefaultconfig handles everything

winged anvil
#

so I can delete copyDefaults()

eternal oxide
#

yes

winged anvil
#

do you know what it does elgar?

#

so i can understand

eternal oxide
#

Well, what you are calling actually just returns teh setting of the boolean

#

default is true, so your getDefaults() is doing nothing

#

its setting by default is true and it causes all default config values to be copied to actual values in memory.

#

basically loads your config

#

but not via the method you called

#

Simple answer is, you never need to use it

#

nor change it

#

for example, if you set it to false, all defaults would remain default and a config.isSet test would return false

#

however if you tried to read a value from your config, even though isSet returned false, it would return the actual default value

#

its basically useless

#

As imagine said, I think people include it because they saw someone else use it and never knew what it does.

#

well, there is ONE use case

#

if you set it to false you could still read values from your config as they would be returned as defaults, but you could test to see if any values had been changed via code, by checking every path with isSet. Only changed settings would return tru for isSet.

winged anvil
#

ok so basically

#

dont use it

eternal oxide
#

yes

winged anvil
#

thank you ElgarL

raw coral
#

if i have a player, then a block how can i change the players directin to face the block

waxen plinth
#

Get the center of the block

#

Get the player's eye location

#

Subtract the eye location from the block location

#

Get it as a vector

#

Set the player's direction to be that vector

#
Block b;
Player p;
Location center = b.getLocation().add(.5, .5, .5);
Vector vec = center.subtract(p.getEyeLocation()).toVector();
Location loc = p.getLocation();
loc.setDirection(vec);
p.teleport(loc);```
raw coral
#

Thanks

torn oyster
#

does anyone have a good setPlayerSkin and getPlayerSkin method?

#

or a good api

ivory sleet
#

SkinRestorer

silver shuttle
ivory sleet
#

iirc has api

torn oyster
silver shuttle
#

seems like it

winged anvil
#

Will addDefault(Path, Key) not appear in my config if I have no key value

eternal oxide
#

you can't call that method without providing a default

winged anvil
#

holdup

eternal oxide
#

why are you setting defaults?

winged anvil
#
        SpawnPoints.getFile().addDefault("SpawnPoints: ", GameHandler.getPoints());
        SpawnPoints.saveFile();``` ?
eternal oxide
#

what does getPoints return?

winged anvil
#

an ArrayList<String>

#

and im trying to fill that up with points

#

but as of now it doesnt have any points

#

when I run a command I want to add a point to that array list then have it save in that file

#

It works with the names, just not this

eternal oxide
#

then SpawnPoints.getFile().set("SpawnPoints", GameHandler.getPoints());

winged anvil
#

should i have that in my onEnable() ?

#

or in the method that actually adds the point

#

to the arraylist

eternal oxide
#

why would your onEnable be adding a list of strings?

winged anvil
#

im not sure

#

it works with the names

eternal oxide
#

what is a point?

patent horizon
#

is there a way to set every key's value in a hashmap to 1 thing?

winged anvil
#

its where the player is standing

#

the center of the block they are at

#

im tryna make spawnpoitns

eternal oxide
#

so a location?

winged anvil
#

yeah but im converting to string

eternal oxide
#

no need, Location is serializable

winged anvil
#

ah ok

eternal oxide
#

so make it an ArrayLIst<Location>

winged anvil
#

i just now changed it from location to string

#

cause i was wondering why it wasnt appearing in the file

eternal oxide
#

then use set and getList

winged anvil
#

ok one sec ill try that

#

waittt

#

what does it mean by "capture of <?>"

blissful cairn
#

Is it possible to import com.mojang.authlib in 1.17? I've gotten it to work with the 1.16.5 depend

<dependency>
      <groupId>org.spigotmc</groupId>
      <artifactId>spigot</artifactId>
      <version>1.16.5-R0.1-SNAPSHOT</version>
      <scope>provided</scope>
</dependency>

but not the 1.17.1 one at https://www.spigotmc.org/wiki/spigot-maven/ which is

<dependency>
       <groupId>org.spigotmc</groupId>
       <artifactId>spigot-api</artifactId>
       <version>1.17.1-R0.1-SNAPSHOT</version>
       <scope>provided</scope>
</dependency>
eternal oxide
eternal oxide
blissful cairn
#

ah gotcha ty!

winged anvil
#

holdup ill send the method

median flame
#

hi

winged anvil
#
public boolean alreadyAdded(Location location) {
        for (Location loc : SpawnPoints.getFile().getList("SpawnPoints: ")) {
            if (loc.equals(location)) {
                return true;
            }
            return false;
        }
    }
waxen plinth
#

Uhhh

#

That's real bad

quaint mantle
#

why not contains

waxen plinth
#

You should load it in and add the locations to a HashSet

#

And then use contains

winged anvil
#

i cant call contains

waxen plinth
#

?!

quaint mantle
winged anvil
#

it wont call!??!!

quaint mantle
#

?!?!?!

winged anvil
#

!?!??!!?!

waxen plinth
#

It sure would be nice if people knew how java worked before trying to write plugins

winged anvil
#

ok

quaint mantle
#

Hello is there a code in java to check if the int is a double number
{0,2,4,6,8} <--

waxen plinth
#

Do you mean how to check if a number is even?

quaint mantle
#

yes

#

jesus christ

waxen plinth
#

num & 1 == 0

quaint mantle
#

๐Ÿคจ

winged anvil
#

lmao

quaint mantle
#

what

#

i don't want to use && xd

#

num % 2 == 0

winged anvil
#

num % 2 == 0

waxen plinth
#

No bruh

winged anvil
#

yea

quaint mantle
#

okay

waxen plinth
#

num & 1 == 0

quaint mantle
#

thx

waxen plinth
#

It's faster than %

#

๐Ÿ™ƒ

#

Ok whatever

winged anvil
#

& > %

median flame
#

Hello

quaint mantle
#

thx guys

waxen plinth
#

Hello

winged anvil
#

redempt

#

im sorry

#

i love you

quaint mantle
#

simp

winged anvil
#

lol

#

ok so

waxen plinth
#

You have betrayed me

winged anvil
#

wtf am i doing

#

im scared of hashmaps

#

fuck maps

waxen plinth
#

HashSet

#

Not HashMap

lean gull
#

henlo

winged anvil
#

see i dont know what that is

waxen plinth
#

It's like an unordered list

winged anvil
#

and im tryan learn