#help-development

1 messages Β· Page 1405 of 1

vast phoenix
#

just to make it wait like 3 seconds before trying to load the data

wraith rapids
#

it would yes, but seems like a pretty fragile approach

#

ideally you would call the server saving the data and ask it to tell you when it's done saving

vast phoenix
#

what else could I do?

#

yeah

#

but

#

I don't want it to depend on the other server that is saving the data

wraith rapids
#

or use the transaction support of your database to make sure that the data is complete before you try reading it

#

it all depends on how you're networking between the servers

vast phoenix
#

I'll try some things out and I'll see what happens

wraith rapids
#

if all else fails, have a little value in your playerdata as stored in the db indicating whether the player is on any server currently

#

when the other server is done saving the data, it will set that bit to false

eternal oxide
#

Have you looked at the source for compareTo()?

vast phoenix
#

that would work too

wraith rapids
#

and the other server would not try loading it before the bit is set to false, and then immediately set it to true

#

atomically, ideally

vast phoenix
#

ok I'll figure it out

vernal basalt
#

idk how to word this but how do you make a "webpage" like dynmap although im doing a stat api

wraith rapids
#

String.compareTo doesn't actually compute the distance

#

it just checks whether each element is > or == or < and fast returns

#

iirc anyway

hybrid spoke
#

Serious Spigot and BungeeCord Programming/Development Help | Ask Questions Here
why does this sound so ironic?

wraith rapids
#

srs bsns

hybrid spoke
#

:'D

wide galleon
wraith rapids
#

we don't have line numbers

#

we can't tell where the exception happened

#

paste the entire class

#

or tell us which line is line 178

wide galleon
#

contents.put(player, player.getInventory().getContents());

wraith rapids
#

contents is null or player is null

wide galleon
#

hm

vast phoenix
#

I rewrote all of the classes

#

testing it now

#

@wraith rapids problem

#

the Thread.sleep thing doesnt work haha

#

it still calls PlayerJoinEvent

wraith rapids
#

not until async prelogin returns

vast quest
#

hey

#

does anyone know why I cant upload to spigot

vast phoenix
#
[20:00:13 INFO]: {}
[20:00:13 WARN]: java.lang.NullPointerException
[20:00:13 WARN]:        at nl.blackminetopia.minetopia.modules.player.events.player.PlayerJoin.onJoin(PlayerJoin.java:73)
[20:00:13 WARN]:        at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor433.execute(Unknown Source)
[20:00:13 WARN]:        at org.bukkit.plugin.EventExecutor$2.execute(EventExecutor.java:70)
[20:00:13 WARN]:        at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:78)
[20:00:13 WARN]:        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62)
[20:00:13 WARN]:        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:513)
[20:00:13 WARN]:        at net.minecraft.server.v1_12_R1.PlayerList.onPlayerJoin(PlayerList.java:370)
[20:00:13 WARN]:        at net.minecraft.server.v1_12_R1.PlayerList.a(PlayerList.java:183)
[20:00:13 WARN]:        at net.minecraft.server.v1_12_R1.LoginListener.b(LoginListener.java:178)
[20:00:13 WARN]:        at net.minecraft.server.v1_12_R1.LoginListener.e(LoginListener.java:68)
[20:00:13 WARN]:        at net.minecraft.server.v1_12_R1.NetworkManager.a(NetworkManager.java:273)
[20:00:13 WARN]:        at net.minecraft.server.v1_12_R1.ServerConnection.c(ServerConnection.java:150)
[20:00:13 WARN]:        at net.minecraft.server.v1_12_R1.MinecraftServer.D(MinecraftServer.java:948)
[20:00:13 WARN]:        at net.minecraft.server.v1_12_R1.DedicatedServer.D(DedicatedServer.java:423)
[20:00:13 WARN]:        at net.minecraft.server.v1_12_R1.MinecraftServer.C(MinecraftServer.java:774)
[20:00:13 WARN]:        at net.minecraft.server.v1_12_R1.MinecraftServer.run(MinecraftServer.java:666)
[20:00:13 WARN]:        at java.lang.Thread.run(Thread.java:748)
#

The {} is output of an HashMap that 100% has an item in AsyncPreLogin

wraith rapids
#

i don't know about 1.12

#

but in any modern versions player join 100% can not fire until the async prelogin event returns

#

it has a pre in the event name for a reason

vast phoenix
#

I understand that

#

I'll try and put my Thread.sleep from 3 to 1

#

seconds*

#

lmao

#

I already found my mistake

#

I have like warp signs but for bungee

#

in the same event above it checks if you have to be teleported if not it returns

#

so that's why my hashmap doesnt get filled

plain quest
#

i have an egg that creates an explosion using world.createExplosion() listening to projectile hit event, if a player dies from that explosion how do i give credit to the killer?

#

so actually the shooter of the egg

vast phoenix
#

@wraith rapids It all works, I just want to say thank you πŸ˜„ This made it so much faster.

wraith rapids
#

πŸ‘ŒπŸΏ

wraith rapids
#

you know what grinds my gears

#

that there's no short circuit assign-or or assign-and

#

half a kingdom for a ||=

vernal basalt
#

im trying to make a json api with player and server stats

vernal basalt
#

how can i make a webpage using just a plugin

#

can someone link me a source

mortal hare
#

use filewriter

#

to write html files

vernal basalt
#

well see that's something im not sure of

mortal hare
#

and output it through outputstream

vernal basalt
#

when you request a normal api

#

is it even html

mortal hare
#

i don't even understand what you're trying to achieve

wraith rapids
#

download the internet

vernal basalt
#

ever seen hypixel's api?

wraith rapids
#

and save it to disk

mortal hare
#

no

vernal basalt
#

ok

#

ever seen any api

eternal oxide
wraith rapids
#

i'm sure he has seen the spigot api

#

considering how this is the spigot api development channel

#

are you sure you know what api means

plain quest
mortal hare
#

is it code smell if i parse static json without the json library via hardcoded parsing code?

#

i mean i shoud probs switch to gson

eternal oxide
wraith rapids
#

probably yes

vernal basalt
#

@mortal hare this is the minecraft name api. enter a uuid get all their usernames

young knoll
#

What would be a good way to let my challenge class listen to specified events, without having a bunch of onEventName methods to override

vernal basalt
#

i wanna make something just with player stats

plain quest
mortal hare
#

to host the service

#

first

wraith rapids
#

hypickle hypickle

plain quest
vernal basalt
mortal hare
#

why would hypixel provide an api in the first place

#

to scrape username accounts lol? πŸ˜„

vernal basalt
#

because hypixel has games and stuff

#

and all the player stats

mortal hare
#

but they're internal

wraith rapids
#

games and stuff doesn't require an api

vernal basalt
#

people have made amazing stat website and stuff

wraith rapids
#

a public api, anyway

vernal basalt
#

like that

#

shows all my stats

mortal hare
#

and you wanna do something like this yourself

#

well what you gonna do

vernal basalt
#

yeah

mortal hare
#

is run a webserver

#

create your service api

vernal basalt
#

someone made it on a fabric mod

mortal hare
#

which connects to db

#

safely

vernal basalt
#

but im switching to spigot

mortal hare
#

and pull the data from there, store it inside json and display it

vernal basalt
#

the stats are survival mc stats lol

#

how does dynmap do it

mortal hare
#

all that mojang api does is it pulls data from the server

#

that's it

vernal basalt
#

i just wanna remake the fabric mod but with spigot

#

idk what lib they used

plain quest
# eternal oxide it should be yes

and one more question.. supposing that the egg will also apply poison to the target and if he dies from the poison how do i give credit to the killer?

wraith rapids
#

90% of the code is unrelated to fabric or spigot

vernal basalt
#

ik

wraith rapids
#

just cuntpaste the code

vernal basalt
#

im not copy and pasting

narrow berry
#

Can anyone help me? I have a bungeecord server, premiumvanish plugin is installed on it, it is not detected by bungeecord. does anyone know what the problem could be?

wraith rapids
#

and change the few bits and pieces to interace the spigot api

vernal basalt
#

that wouldn't work

mortal hare
#

so do you want to just use hypixel api

#

or

vernal basalt
#

no

mortal hare
#

create your own api of your server

wraith rapids
#

or look at how they did it

#

infinitely more helpful than asking everything 1 by 1 here

vernal basalt
#

all i need to know is how people make those pages hosted on a mc server

vernal basalt
#

like dynmap

wraith rapids
#

by running a webserver

mortal hare
#

and backend language

#

css for design

vernal basalt
#

yeah but then how do i link it to mc

mortal hare
#

via database?

wraith rapids
#

a webserver is a webserver

mortal hare
#

or redis?

vernal basalt
#

ik how to make webstes and stuff

wraith rapids
#

it's just spinning code

vernal basalt
#

but an api doesn't do that

wraith rapids
#

it doesn't matter whether it's standalone

mortal hare
#

use databases or redis

wraith rapids
#

or packaged in a plugin

mortal hare
#

to speak with your server on webserver

#

if you store your data in a database which is not dynamic in runtime

#

just access the database

#

of the server

#

via programming language

#

of your choice from backend

#

you can even use java i think

#

but i prefer php

#

or node js

#

its the same process as hooking your plugin to the sql database

young knoll
digital plinth
#

damn i cant get rid of this error ever since i got a god damn server crasher creeper from wrust

vernal basalt
#

😫 you guys dont get it

#

i found someone who did

digital plinth
digital plinth
#

the .dat file is not being recreated

#

hmmmmmmmmmmmmmmm

#

πŸ˜•

mortal hare
#

playerdata is stored inside playerdata folder

wraith rapids
#

what am i even looking at

mortal hare
#

nowadays i think

digital plinth
chrome beacon
#

That error comes from your kitplugin?

mortal hare
#

check your folder permissions

#

then

wraith rapids
#

that isn't even playerdata

vernal basalt
digital plinth
#

empty

#

see?

wraith rapids
#

that comes from some shit tier kit plugin trying to parse a yaml config

vernal basalt
#

see something like this

mortal hare
wraith rapids
#

yes, and like I keep telling you, a webserver is a webserver

#

it doesn't matter where it runs

#

it doesn't matter whether it's standalone or fired by a plugin

#

the shit under the hood is the same

#

just the entry point is different

digital plinth
wraith rapids
#

at me.sg.kit.KitPlugin.onCommand(KitPlugin.java:158) ~[?:?]

mortal hare
#

if the server is yours

#

just use standalone webserver

#

less overhead

digital plinth
#

how did i not see that line

mortal hare
#

if you're trying to make dynmap like plugin

#

use this

#

but for an api

#

this is not what its used for

digital plinth
#

but it also have line other at blah blah blahs

#

eg: at org.bukkit.command.PluginCommand.execute(PluginCommand.java:45) ~[server.jar:git-Paper-463]

wraith rapids
#

yes

#

the server received a command from a player

mortal hare
#
import com.sun.net.httpserver.HttpExchange;
import com.sun.net.httpserver.HttpHandler;
import com.sun.net.httpserver.HttpServer;
#

all it does

wraith rapids
#

which it then told the plugin to execute

#

and the plugin code blew up

mortal hare
#

it wraps JDK's dedicated webserver

digital plinth
#

oh

wraith rapids
#

or more specifically, the plugin code asked snakeyaml to parse a config file

#

which asked the server to deserialize an itemstack

mortal hare
#

which is slow compared to webserver like litespeed

wraith rapids
#

and that blew up

mortal hare
#

or nginx

wraith rapids
#

in particular it blew up while trying to deserialize the item meta of a spawn egg

quiet ice
#

You do not want to import com.sun.* packages

wraith rapids
#

and in particular it exploded because the serialized entity type of that spawn egg is minecraft:Creeper

#

and not minecraft:creeper

#

delete or clean the associated config file

#

as for which config file it is, nobody knows

mortal hare
#

iirc

wraith rapids
#

not recorded in the stack trace

quiet ice
#

that is not the thing

#

The thing is that they no longer work in modern versions of java due to modules being a lot stricter

mortal hare
#

sun microsystems don't exist anymore, oracle owns it now

#

i mean it kinda is

digital plinth
mortal hare
#

but its old

digital plinth
#

weirdddd

wraith rapids
#

the entire yaml file is read at once

quiet ice
#

the sun unsafe class still exists

wraith rapids
#

it doesn't go to the disk to grab the specific path you want when you call get

#

it loads the entire file into memory at once

#

and parses it all at once

mortal hare
#

the only thing i found there interesting is volatile arrays (not reference to the array)

wraith rapids
#

and then it sits in memory until you get rid of it

#

volatile arrays would be nice

quiet ice
#

what are those?

mortal hare
#

they kinda do exist

wraith rapids
#

they're arrays whose elements are volatile

quiet ice
#

java volatile or something else volatile?

wraith rapids
#

same principles apply to the array elements as would apply to a field declared as volatile

#

yeah, java volatile

mortal hare
#

volatile array would you be able to read items from primitive arrays without synchronisation from multiple threads, since it would flush LM cache everytime it access

wraith rapids
#

having to synchronize on an entire array or some shit just for memory visibility in a specific index is cancer

mortal hare
#

is there are manual way to flush LM cache apart from using synchronised codeblock

wraith rapids
#

i've even occasionally gone fuck it and just created a class with like 20 volatile fields or however big of an array I needed

mortal hare
wraith rapids
#

but of course that's fucking cancer too and only works for that exact array size and accessing it is even more cancer

#

well i mean synchronized code block doesn't flush anything either

#

that's a misconception from people dumbing down how memory barriers and shit work

mortal hare
#

well i read it

#

in one source

wraith rapids
#

the actual underlying mechanism under the hood is fucking eldritch black magic and unknown and varies from mpl to impl

mortal hare
#

yesterday

wraith rapids
#

if the machine had to flush the related cache every time you refer to a volatile field or enter a synchronized block you would literally never get anything done

#

it's more fine tuned than that

young knoll
#

Maybe i'll just stick with an abstract method for each event, even though that is ugly

mortal hare
#

well this video

#

says that if one volatile field is accessed or written inside that thread

#

whole fields from thread are gonna be flushed after volatile field is written or read

#

i just can't find the right timestamp for it

wraith rapids
#

like, yes, in principle and in appearance

#

but it's not quite as simple

mortal hare
#

ofc it its

wraith rapids
#

f.e an uncontended volatile is almost as fast as a regular field

#

while a contended volatile is much slower

mortal hare
#

its just like you say black magic

#

of JVM

wraith rapids
#

in a language as abstract as java you are kind of fucked when you step into the territory of "how do I make the machine flush this particular cache"

#

because there is basically never any guarantee that the machine does what you want

mortal hare
#

yea

wraith rapids
#

it might just not flush it in all silence because it deems it unnecessary

mortal hare
#

i would love to have an optional ability to destroy objects

#

like in c

#

since those are on heap

#

i mean it could run garbage collector, but it should give an ability to destroy them manually instead of waiting garbage collector

wraith rapids
#

touching anything related to the gc is kind of eeh as well since that is its whole own sector of black magic

mortal hare
#

I'm looking forward to the rust

#

some dude just showed me couple days

#

how awesome that compiled language is

#

and i should give it a try sometime in a future soon

wraith rapids
#

you look like you're getting an aneurysm

mortal hare
#

wat

wraith rapids
#

how many days did he show you

mortal hare
#

1

#

im just curious

#

never tried it

sharp bough
#

how can i reorganize the numbers in the config yml?
i currently have this config yml https://paste.md-5.net/olojiqamon.bash
i want to delete any number and be able to rename the rest to the next number if its not null

#

or rename the current one to the number in a foor

#

so far i have this

            System.out.println("test1 " + Main.get().getConfig().get("beds." + player.getUniqueId() + ".bedsLocation." + beds));
            System.out.println("test2 " + Main.get().getConfig().get("beds." + player.getUniqueId() + ".bedsLocation." + (beds+1)));
            try{
                if((Main.get().getConfig().get("beds." + player.getUniqueId() + ".bedsLocation." + (beds+1))) != null){
                    System.out.println("test3 " + beds);
                    Main.get().getConfig().set("beds." + player.getUniqueId() + ".bedsLocation", beds);
                }
            }catch (Exception e){
                player.sendMessage(getErrorMessage());
            }
        }```
#

but it doesnt work

young knoll
#

getInt / getDouble

mortal hare
#

don't forget to include default value with that provided, if value doesn't exist or is invalid it will always return 0 by default, and that could cause issues since it returns primitive

languid geode
#

@worldly ingot Regarding piglin trade event would it be beter to return an offlineplayer as a trade can still happen if a piglin picks up a trade item dropped by a now offline player

wraith rapids
#

swallowing exceptions

young knoll
#

Ah okay those are locaations

wraith rapids
#

how about you don't just catch and swallow an Exception

young knoll
#

I believe there is a getLocation

wraith rapids
#

what are you going to do when your player says they got an error message from the plugin?

#

the error message won't contain any useful information on where the exception happened or why

worldly ingot
wraith rapids
#

you are literally incapable of debugging this command and figuring out what went wrong

wraith rapids
#

return an UUID

wraith rapids
#

don't swallow exceptions

mortal hare
# sharp bough wdym

if the config file doesn't contain that particular value you're asking it would return primitive int with default value 0 in it

wraith rapids
#

throw a e.printstacktrace in there even if you're not done

mortal hare
#

it can lead to bad things

#

if not handled properly

sharp bough
mortal hare
#

strangely it doesnt return Integer object instead for that

wraith rapids
#

returning an object would force our aspiring and brilliant newcomer developers to nullcheck their values

sharp bough
#

and is there some kind of next? like Main.get().getConfig().set("beds." + player.getUniqueId() + ".bedsLocation." + NxtValue, beds);

mortal hare
#

If the int does not exist then the specified default value will returned regardless of if a default has been identified in the root Configuration.

vital ridge
#

Can someone tell me why this is not working:

@EventHandler
    public void onEnchant(EnchantItemEvent e) {
        
        System.out.println("ran!");
        
        Player p = e.getEnchanter();
        
        int randomMultiplier = new Random().nextInt(254) + 1;
        
        ItemStack item = e.getItem();
        
        Map<Enchantment, Integer> enchantments = item.getEnchantments();
        
        for (Enchantment ench : enchantments.keySet()) {
            
            System.out.println(enchantments.keySet());
            
            int oldValue = enchantments.get(ench);
            
            System.out.println(oldValue);
            
            enchantments.replace(ench, oldValue * randomMultiplier);
            
            System.out.println(randomMultiplier);
            
            System.out.println(enchantments.get(ench));
            
        }
        
        item.addUnsafeEnchantments(enchantments);
        
        System.out.println(enchantments);
        
    }

everytime an item is enchanted it should multiply the enchantment level with 1 - 255 value

mortal hare
vital ridge
#

but its not doing it, its just giving the item the normal enchantment

#

like my code does not even exist

wraith rapids
#

enchanting events are pretty fucked up

mortal hare
#

use instead

wraith rapids
#

you might need to use prepare enchant event, if that exists

mortal hare
#

your code thread include random number generator internally

vital ridge
#

but

#

Any of my debug messages

#

is not even running

#

only the first one

#

and the last one

#

nothing inside the for loop

wraith rapids
#

what about the last one

mortal hare
#

that means map is empty

wraith rapids
#

System.out.println(enchantments);

languid geode
mortal hare
#

if its not iterating

vital ridge
#

its printing out []

#

so maybe i should use

#

preparenchant event

#

or whatever it was

#

cuz i rly dont understand what im doing wrong in my code

mortal hare
#

that was a response for this particular answer

languid geode
#

Ugh the bot again. As i was saying, Always nullcheck if the method is nullable or not specified because lord knows most MC devs dont bother using nullable annotations

ivory sleet
#

In IntelliJ it infers that and contract

mortal hare
#

yeah, we were discussing why MemorySection doesnt have a method for returning boxed integer instead of primitive one, but eh

ivory sleet
#

Just autobox?

languid geode
#

MemorySection in bukkit?

wraith rapids
#

if it's printing out [] that means there are no enchants

vital ridge
#

are normal maps immutable?

wraith rapids
#

and the for loop obviously won't run

vital ridge
#

like you cant replace stuff in them?

mortal hare
#

if its null its null

ivory sleet
#

primitive int isn’t nullable

mortal hare
#

thats the point

#

while configuration key could not exist

round finch
#

i were thinking how it be possible to spawn spefic custom mob with model and texture using spigot?

mortal hare
#

it would way better if it used boxed return types

ivory sleet
#

If you want a boxed integer then just autobox or what? Am I misunderstanding

#

Yeah dovidas

young knoll
#

What type of map is it

ivory sleet
#

Or smtng like OptionalInt ig

young knoll
#

Hashmap is mutable

vital ridge
#

dovidas, are normal maps immutable? I tried PrepareItemEnchantEvent, that just threw an error after enchanting, cuz its telling me that im doing unsupported operation, the error points to the line where im replacing something in the map

#

Coll

#

let me send you my code

languid geode
#

I swear can this bot get off my back

mortal hare
#

no they're not

vital ridge
#
@EventHandler
    public void onEnchant(EnchantItemEvent e) {
        
        System.out.println("ran!");
        
        Player p = e.getEnchanter();
        
        int randomMultiplier = new Random().nextInt(254) + 1;
        
        ItemStack item = e.getItem();
        
        Map<Enchantment, Integer> enchantments = item.getEnchantments();
        
        for (Enchantment ench : enchantments.keySet()) {
            
            System.out.println(enchantments.keySet());
            
            int oldValue = enchantments.get(ench);
            
            System.out.println(oldValue);
            
            enchantments.replace(ench, oldValue * randomMultiplier);
            
            System.out.println(randomMultiplier);
            
            System.out.println(enchantments.get(ench));
            
        }
        
        item.addUnsafeEnchantments(enchantments);
        
        System.out.println(enchantments);
        
    }
#

i got an error at enchantments.replace

ivory sleet
#

Nuxoria if you get UOE then it’s probably immutable

mortal hare
#

by default maps cant have null keys inside it

#

so check if object is not null before adding it to the map as a key

languid geode
#

Nuxoria did you read the JDocs

mortal hare
#

you cant set null as key

#

i meant

vital ridge
languid geode
#

How about you do that before asking questions most of the times JDocs answer all questions

ivory sleet
#

There’s no by default there, it depends on implementation

languid geode
#

@mortal hare Well yes but no in java everything can technically be null πŸ˜›

chrome beacon
#

^^

mortal hare
#

?

languid geode
mortal hare
#

Objects can be null, but not primitives and that's the point of this discussion. Bukkit configuration api when getting value from memory return primitive int instead of boxed integer, that way it needs to fallback to its default values of primitive, instead it could be checked as null

vital ridge
#

Well as much as i understood from the jdocs

ivory sleet
#

I mean isSet exists

vital ridge
#

my map is immutable

#

aka i cannot modify it

#

aka im fucked

#

aka i got to think a new method

languid geode
mortal hare
#

maps are not immutable, unless you use some kind of implementation of it

languid geode
vital ridge
#
Map<Enchantment, Integer> enchantments = item.getEnchantments();
young knoll
#

It does say on the javadocs it returns an immutable map of the enchants

vital ridge
#

this is my map

mortal hare
#

you can't edit it

#

its immutable

#

so you're kinda right

vital ridge
#

shiiit

#

Well

#

that was the best thing i came up with

#

nice

young knoll
#

Correct, this is what add and removeEnchant are for

mortal hare
#

there's specific methods for adding enchantments

languid geode
#

What event are you using

#

Get map of enchantment (levels, keyed by type) to be added to item (modify map returned to change values).

#

are you using prepare?

vital ridge
#

Iam now since EnchantItemEvent basically didnt even run my code

#

Im trying to multiply item enchantment levels everytime they are enchanted

#

so if you enchant and get sharp 2

languid geode
#

Is this a bug? its supposed to work easily

vital ridge
#

it can be sharp 200

#

Its problaly not a bug

#

im problaly doing something wrong

languid geode
#

@mortal hare where did you find that code

mortal hare
#

its immutable since it uses custom extended class which is extended treemap

mortal hare
languid geode
#

I get that but what class

mortal hare
#

ItemStack

#

what i would do

languid geode
#

Why you trying to edit the enchantments on a itemstack use the event method

mortal hare
#

get object of itemstack

#

via some kind of method

#

then CTRL

wraith rapids
#

most developers have sources

mortal hare
#

and left click

#

and bam

wraith rapids
#

that they have built for their fork of choice

#

and usually imported into their ide

languid geode
#

@wraith rapids I got the full source i dev for the main branch

vital ridge
#

Well last time i wanted to try this but i ditched it:

e.getItem().addUnsafeEnchantment((Enchantment) e.getItem().getEnchantments(), randomMultiplier * e.getItem().getEnchantmentLevel((Enchantment) e.getItem().getEnchantments()));
mortal hare
#

What i do is use some kind of method to get and object which i want to peek at,
then i do CTRL + left click to peek inside and then if its interface i right click, press go to, and click go to implementations

languid geode
#

Yeah but your doing it wrong you need to modify the map that the event gives you

mortal hare
#

its very useful and saves time

languid geode
#

Im well aware i used intellji the past 4 years now xD

wraith rapids
#

you can also use middle mouse button instead of ctrl-lmb

mortal hare
#

also, why tf would NMS use treemap

#

instead of hashmap

#

for the enchantments

languid geode
#

Dont ask questions when it comes to NMS please

mortal hare
#

πŸ˜„

languid geode
#

We hate touching that dump tbh but we cant avoid it

wraith rapids
#

i guess the tree map is slightly smaller for most items

#

memory footprint wise, anyway

#

but like, I doubt that's the driving force behind that decision

vital ridge
#

so anybody has any ideas

wraith rapids
#

mojang and performance or efficiency don't go hand in hand

vital ridge
#

how should i multiply the enchants

#

under enchant evewnt

#

im literally out of ideas

languid geode
#

@vital ridge EDIT the map the event gives you

mortal hare
#

but its slower

vital ridge
#

e.getEnchants?

#

or the levels

languid geode
#

YES!

vital ridge
#

Aight

wraith rapids
#

EnchantItemEvent:getEnchantsToAdd

languid geode
#

^

#

πŸ€¦β€β™‚οΈ

fresh heath
#

idk why I am so lost to this: I want to make a variable int hashitmanytimes in EntityDamageByentity event and every timeplayer hits a entity the value goes up by 1 like hashitmanytimes = hashitmanytimes++; but hashitmanytimes needs to have a value of 0, but I just dont know where to put it so if I hit an entity the value will not be set to 0.

young knoll
#

What

wraith rapids
#

what

fresh heath
#

so basically when player hits entity then hashitmanyitems goes up by 1

wraith rapids
#

that's not a hash

#

that's a counter

fresh heath
#

dude

#

hashitmanyitems is int hashutmanyitems

#

hiy*

#

hit*

wraith rapids
#

hash it many times

undone pebble
#

HasItManyItems

wraith rapids
#

has hit many times

fresh heath
#

yes variable called has hit many times

ivory sleet
#

Hash it many times lol

vital ridge
#

I cant

#

This fuckin

#

enchantitemevent

#

is jsut not running my code

ivory sleet
#

EventHandler?

vital ridge
#

Yes

undone pebble
#

Registered?

#

debug it

vital ridge
#
@EventHandler
    public void onEnchant(EnchantItemEvent e) {
        
        Player p = e.getEnchanter();
        
        int randomMultiplier = new Random().nextInt(254) + 1;
        
        ItemStack item = e.getItem();
        
        for (Enchantment ench : item.getEnchantments().keySet()) {
            
            int oldValue = item.getEnchantments().get(ench);
            
            item.getEnchantments().replace(ench, oldValue * randomMultiplier);
            
        }
        
    }
wraith rapids
#

hello

undone pebble
wraith rapids
#

can you hear me

undone pebble
#

no

wraith rapids
#

get it from the event

#

not the item

#

you doofus

languid geode
#

No No No @vital ridge modify the event map not the item

fresh heath
#

alr going bac to learn what hash is

wraith rapids
#

-------------- >>>>> EnchantItemEvent:getEnchantsToAdd <<<<<--------------

languid geode
vital ridge
#

Theres no EnchantItemEvent.getEnchantsToAdd

wraith rapids
#

is that paper only? lmao

#

get fucked i guess

languid geode
#

There is do you need glasses jesus christ

#

Omg he is trying to statically access it

wraith rapids
#

inb4 he's trying to autocomplete it on the itemstack

languid geode
wraith rapids
#

numbnut

languid geode
#

@vital ridge access it thru your instance jesus

mortal hare
#

Not to be rude, but you should probably learn basics of java first.

languid geode
#

^^^^ this so much

tender aspen
#

any1 know a good rank shop that u can sell luckperm ranks on

mortal hare
vital ridge
#

whatever

#

fuck this

wraith rapids
#

my paypal

#

you'll get the ranks

#

in 7-10 business days

fresh heath
#

is hash just pretty much checking if 1 value is equal to another

wraith rapids
#

hash my browns

undone pebble
#

no potato

fresh heath
#

stupid potato

wraith rapids
#

anyway

#

describe what it is that you want to achieve

#

and what I mean by achieve is not "i want a variable that does this", I mean what do you need that variable for

mortal hare
#

hashing is like roughly putting a data through hydraulic compressor. you can decompress it, if its backward decodable.

wraith rapids
#

your question is nonsensical and nobody has any idea how to answer you

languid geode
#

Has anyone of you had to look thru the spigot source NMS classes

mortal hare
#

yes

wraith rapids
#

i only look at paper source nms classes

#

but yes

mortal hare
#

im doing it rn

languid geode
#

Im crying RN have to access some very old nms

wraith rapids
#

i've had to fuck with nms plenty as well

languid geode
#

this shit looks like it was writen by a monkey on a typewriter

wraith rapids
#

one of the more irritating cases is the lobotomizer timings integration

#

aikar just had to go and fuck it up

ivory sleet
#

It may look worse cuz its decompiled but yeah some nms back then wasnt just good

wraith rapids
#

fuck aikar, I will shit on his grave

mortal hare
#

what's wrong with timings implementation

#

?

languid geode
#

@ivory sleet Got original access to the mojang github

ivory sleet
#

ah

wraith rapids
#

in paper 1.16.4 or .3, aikar changed the way how entities hold onto their timigns handlers

#

it used to be that every entity had their own handler reference

fresh heath
#

basically if player hits entity 10 times then they will get strength, all is done expect the checking if player has hit 10 times

wraith rapids
#

that just referred to the common handler instance of that entity type

languid geode
#

Still hurts even if its not method a b c d x

mortal hare
#

and why does it bother you?

wraith rapids
#

that is to say, I could change the handler of any specific entity, and then that entity would count towards a different timings section

#

however, he changed it

#

now, the reference is on the entity type

ivory sleet
#

bruh

wraith rapids
#

which means that to change the timings entry an entity counts towards

#

I need to create a new fake entity type for it

#

assign it to that type

#

then reflectively hack into the final entity type of that entity

#

and hammer the new fake type in it

mortal hare
#

is that a struggle for you because you register custom mobs via nms?

wraith rapids
#

it's a struggle because I want lobotomized villagers to show up separately on timings

#

which means that some villagers need to use a different timings handler than others

mortal hare
#

^^ perfectionist

#

why does it bother you to have that timings tab

#

ok its better to debug

#

but its not like important or anything

wraith rapids
#

it's really useful because it lets you know how much of an effect the plugin has on the server performance

#

it lets you keep track of whether your players are keeping villagers in a lobotomizing compatible way

mortal hare
#

well he probably changed it to have better performance

vital ridge
wraith rapids
#

doesn't affect performance really

vital ridge
#

I now understood what i need to do

mortal hare
#

or have less memory footprint

wraith rapids
#

it's just an extra field access per entity per tick and an extra 32 bits of memory per entity

#

literally insignificant

vital ridge
#

Yeah i got my plugin working now

#

thanks

wraith rapids
#

we don't know what your e is

#

you might be calling your event "myEvent"

mortal hare
#

eulers constant

vital ridge
#

Yea okay gotchu, i just dont know those keywords lmao

ivory sleet
#

keyword?

vital ridge
#

Thanks anyways

wraith rapids
#

:: and # refer to instance methods usually

languid geode
#

Keywords?

wraith rapids
#

. usually refers to static methods

languid geode
#

did he just call an instance a keyword

ivory sleet
#

javadocs inconvenience uses # for both static and instance methods πŸ₯²

vital ridge
#

DID NOT KNOW

#

πŸ™‚

mortal hare
#

stop fucking around

#

with him

#

nerds

languid geode
#

I swear to god im gonna have a mod pin Read the documentation before asking a question or something along those lines

#

!jdocs

#

darn

wraith rapids
#

the # in javadocs is just a html anchor for the specific line on the page

mortal hare
#
Static method (initialised only once and only when called first time) - ClassName.staticMethod();
Instance method (initialised once per instance) - Object.instanceMethod()

Same rules are valid for fields too

#

i might be wrong about static intialisation time, but that's valid for fields idk

fresh heath
#

how tf I have read so many articles of Hash and all I have gotten is "key"

languid geode
#

Yeah there is no instantiation in statics i believe

wraith rapids
#

hash has nothing to do with what you're trying to do

fresh heath
#

but

#

what

#

didnt u say I neede that

mortal hare
#

Hash is a blob of encoded data which can be used to secure data or be compressed and then decompressed with special programs, and its used in blockchain like cryptocurrencies
What are you mentioning is the HashMap. Its a map with key value structure, which uses Hashes to access the data fast by using key as an object

wraith rapids
#

no i just said that your variable looks like hash it many times

#

hash it many times
has hit many times

#

anyway, what you want is not a variable

#

you want a map that keys Player -> number of times hit

#

which incidentally is going to be a Hash Map

#

but you can just forget about the hash part, that is coincidence

#

and now he is even more confused

mortal hare
#

ok

#

😐

fresh heath
#

I kinda dont want u to giveme answer but just what do I need to do

wraith rapids
#

do you know what a map is

fresh heath
#

hashmap ?

wraith rapids
#

no, a map

languid geode
#

a map

#

@wraith rapids Man we sure are bullies today haha

fresh heath
#

idk a kery

#

key

mortal hare
#

Map is literally a map

wraith rapids
#

a map is a thing that associates things with other things

mortal hare
#

but stored inside computer

wraith rapids
#

for example, a map could associate a player's name with the number of times that player has punched

mortal hare
#

like minecraft map with banner markers on it

#

to mark where places are

wraith rapids
#

then you could give that map a player's name

#

and it would return you the number of times they've punched

fresh heath
#

so basically map just stores values

mortal hare
#

Yes

wraith rapids
#

sort of yes

#

it stores values for keys

mortal hare
#

but its not like list

#

its placement of object values is chaotic.

fresh heath
#

so what is the diffrence between int ....; and map

wraith rapids
#

int is a number

#

map is a map

mortal hare
#

lemme gimme an example

fresh heath
#

map is a String ?

wraith rapids
#

map can store the names and phone numbers of 10,000 people

#

int can store a number

fresh heath
#

actually 10,000 or like u meant infinity

wraith rapids
#

indefinitely many yes

#

have you ever used a phone book?

#

you know, a book with peoples' names and phone numbers in it?

mortal hare
#
Player player = e.getPlayer();

Map<Player, Integer> playerData = new HashMap<Player, Integer>();

kills.put(player, 5) // Sets data for that player to 5

Integer kills = kills.get(player);  // Gets the data of the player
wraith rapids
#

a phone book is a map

#

it's keys are the persons' names

mortal hare
#

if it has names of people, yes

wraith rapids
#

its values are the persons' phone numbers

mortal hare
#

if its not

#

its a list

#

of numbers

wraith rapids
#

if you want to know someone's phone number, you open up the book

#

you find the name of the person

#

and then you look at the phone number written next to it

#

doing this is the same as calling map.get(person's name)

#

map.get(person's name) will return person's phone number

digital plinth
#

hmm is it possible for a plugin to make mobs fight other mobs

mortal hare
#
Map<String, Integer> numbers = new HashMap<>();

numbers.put("John", 440547865);
Integer number = numbers.get("John"); // Gets number of john from phone book map
wraith rapids
#

put

fresh heath
#

yes I got that

mortal hare
#

yea

#

edited

wraith rapids
#

kek

#

well, now, you want to track how many times each player has punched

#

you create a map

#

with the players as keys

#

and the # of times punched as values

#

and then just call .get and .put accordingly

fresh heath
#

so I make map put like Playerkills, 10
and then I get Playerkills and it is 10

viscid oasis
#

Hello πŸ™‚ Have a question... I am now working on custom virtual inventory, that player access with command and I want to allow player to take items from that inventory out to their, but not from their inventory to the virtual one. Can someone help me with this out?

fresh heath
#

I am here no idea what next

        Map<String, Integer> PlayerKills = new HashMap<>();
        PlayerKills.put("hashitmanytimes", 0);
wraith rapids
#

you want to use the player's name as the key

fresh heath
#

I am glad I am even here lol

wraith rapids
#

that way every player will have a record in the phone book

#

when your plugin starts, your phone book will be empty

#

because nobody has punched yet

fresh heath
#

PlayerKills.put("My name", 0);

wraith rapids
#

you don't have any phone numbers to record

#

but when someone punches

#

you want to listen to that event

#

open up the phone book

#

and then increment the value in the phone book

#

if they aren't on the phone book yet, you add their name and write 1 next to it

viscid oasis
wraith rapids
#

if they are, you replace the number next to their name with a bigger number

mortal hare
#

check if clicked slot id is lower then top containers lowest id

wraith rapids
#

if (map.contains(player.getName()))

#

check whether the player is on the phone book

#

if they are, get their current number

mortal hare
#

or the opposite

wraith rapids
#

int number = map.get(player.getName())

#

and then increase it by 1, as they just punched

#

number = number + 1

mortal hare
#

inventories are synced with the server

#

if you create one

wraith rapids
#

then write it back in the phone book

fresh heath
#

so this

        Map<String, Integer> PlayerKills = new HashMap<>();
        PlayerKills.put("MrCooxie", 0);

Should not be in EntityDamageByEntityEvent

mortal hare
#

and store it somewhere

wraith rapids
#

map.put(player.getName(), number)

mortal hare
#

then open

#

items would still be there

wraith rapids
#

no, what you are doing there is hard-coding the name

#

you want to get the player's name

mortal hare
#

if clicked slot is higher than bottom inventory's highest slot, then cancel event

#

otherwise dont

#

if you want to place items inside

#

but not outside

viscid oasis
# mortal hare or the opposite

well i create the inventory from mysql data, player votes, with votifier i store the number of votes in db, then when creating inventory i take the number from db and make it as same number of specific item. and i need to allow user to only take this items out, like as atm, not allowing to put anything back... when they take items out, it triggers event that count items that is left in inventory and save that number back to mysql...

fresh heath
#

Sai Nnya...
you don't have any phone numbers to record
but when someone punches
you want to listen to that event
open up the phone book
and then increment the value in the phone book
if they aren't on the phone book yet, you add their name and write 1 next to it
How the hell should I know how to do that.

wraith rapids
#

didn't you have a code snippet earlier where you were listening to like player interact event or something

mortal hare
#

but opposite

#

if clicked slot is lower than top inventory's highest slot - cancel event

fresh heath
#

How you guys get so good at java like bruh

wraith rapids
#

we started with a guide on how to deal with java

mortal hare
#

wait till you see C

wraith rapids
#

and then we did java until we got comfortable with it

#

then, and only then, did we move to the bukkit api

mortal hare
#

C is more archaic than java

viscid oasis
eternal night
#

also really hating yourself helps if you want to sink days or months of work into java

nova lark
#

Hello! I finished setting up a spigot local server earlier and i'm trying to make my first plugin ! I'm following the gradle tutorial on the wiki, and i'm wondering, which sdk is better? Are they all just as good or is there an advantage to going with version 11?
I have 0 experience with Java or making plugins/servers

mortal hare
#

what you can do actually

#

is to check

mortal hare
#

if clicked slot is inside the top inventory range

wraith rapids
#

snippet just means like

#

excerpt

#

part of something

#

not programming or java related

#

it's just an english word

viscid oasis
fresh heath
#

I have

    @EventHandler
    public void onhit(EntityDamageByEntityEvent event){

event

nova lark
#

If anyone could help me it would be great :)

wraith rapids
#

we're not going to be your interactive "how to learn java and bukkit" tutorial

nova lark
#

? what

wraith rapids
#

if you have 0 experience with anything, go read some guide

mortal hare
#
if (e.getSlot() <= e.getInventory().getType().getSize()) {
  e.setCancelled(true);
}
#

try this

wraith rapids
#

then come back with at least a little bit of experience

mortal hare
#

this would not let click inside top container inventory

wraith rapids
#

learn java first; look up some guide and then try doing some simple excercises with it

nova lark
#

Listen man chill out, I was just asking about the jdk because I couldn't find anything online, I apologize if it's making you angry.
I wasn't going to ask anything else

#

but I understand now

#

bye

mortal hare
#

they're nerds

wraith rapids
#

i'm not angry and I am chill

mortal hare
#

socially awkward

#

chill

eternal oxide
viscid oasis
wraith rapids
#

real men go with 8

wraith rapids
#

you'll want to prevent shift clicking from the other inventory

#

if you're preventing people from placing stuff

#

and if you're preventing people from picking stuff, you'll want to prevent COLLECT_TO_CURSOR in the other inventory

nova lark
#

@eternal oxide Thanks alot !
Now i'll come back when I have a master's degree

wraith rapids
#

literally told you to learn the basics of java before asking for help here

#

if you already know the basics of java, then that's fine

mortal hare
#

or do something like this

quiet ice
wraith rapids
#

when you say "i have 0 experience with anything" i'm going to assume you don't know a single bit about java

sage swift
#

1.16 uses java 16 yes?

eternal oxide
#

no

wraith rapids
#

kek

mortal hare
#

java 11+

sage swift
#

yes

quiet ice
#

Yes, if you make it

sage swift
#

it does use only java 16

#

i try with java 29 and corrupt system

mortal hare
#

it uses JRE 3.0 at 3 AM

sage swift
#

Java 1.8

viscid oasis
#

omg why it cant have initiation click event and destination click event... πŸ˜„

mortal hare
#

because mojang is too dumb

#

to include it in their packets

#

when you shift click

#

it doesnt tell you where the destination

#

is

#

in sent packets

#

kinda dumb since client calculates destination and then server recalculated that destination

wraith rapids
#

that's no excuse for bukkit not to include it though

mortal hare
#

doing twice the job

wraith rapids
#

the server computes it anyway

viscid oasis
#

InventoryMoveItemEvent like this will be the best one, but it does not work for player interaction...

wraith rapids
#

might as well expose it in the api

#

now it needs to be done once by the client, once by the server

mortal hare
#

Bukkit is not implementing this

wraith rapids
#

and once by every fucking plugin individually

wanton cipher
#

how a plugin to make ranks apear on ur head ?/:

mortal hare
#

it would break backwards compatiblity

wraith rapids
#

oh yeah those poor fucking 1.8 plugins

mortal hare
#

its an internal NMS implementation

wraith rapids
#

still should be exposed in the bukkit event

mortal hare
#

which i cant find lol

#

i overriden that

#

to calculate proper shift clicking

#

only in bottom containers as i provided

wraith rapids
#

is that the thing you've been fucking with for the past few days

mortal hare
#

yes

#

actually

#

more than that

#

i've been implementing all of the inventory actions

wraith rapids
#

you mean the mojang server impl computes the shift click results wrong?

#

lol

mortal hare
#

but it computes it wrong according to the rules of GUI

viscid oasis
#

looks like i leave the idea of inventory, and just give them the items with commands...

wraith rapids
#

is there a difference

mortal hare
#

do you want to have shift clicked items in to the GUI elements itself?

wraith rapids
#

what's a gui element

mortal hare
#

ItemStack

#

i call it

#

which is not obtainable

#

and only for decoration purposes

wraith rapids
#

what

mortal hare
#

Inventory GUI's ffs

wraith rapids
#

you have completely lost me

mortal hare
#

Have you heard of concept - Inventory GUI's

wraith rapids
#

yes

mortal hare
#

try to shift click

#

while open

#

it will end up in the inventory gui itself

#

that's why i overriden it

wraith rapids
#

ah so you mean you want to reimplement shift clicking so that you can blacklist certain slots from being shift clicked to in such guis

mortal hare
#

kinda

wraith rapids
#

i looked into that at one point as well

#

and then decided it wasn't worth the effort

mortal hare
#

i already did it

#

it works pretty well

#

but its not blacklisting

#

it disallowing it for all the types

wraith rapids
#

well i mean

#

disallowing it is just a big blacklist

mortal hare
#

idk

quaint mantle
#

I mean*

wraith rapids
#

some guis could have slots that you can use as if it was a container

#

is your thing flexible enough to let me shift click shit into those

mortal hare
#

yes

wraith rapids
#

so it goes on a slot by slot basis

vital ridge
#

do yall remember my enchantment issue?

young knoll
#

Did you just correct me

vital ridge
#

Basically , nothing wrong under the event

mortal hare
#

goddamit

vital ridge
#

But i was wondering

young knoll
#

On a message from February

mortal hare
#

that bot

wraith rapids
#

ikr

#

fucking trash

vital ridge
#

how could i do it under a normal runnable (runtasktimer)

wraith rapids
#

why is it necessary for this to happen on like the packet layer though

vital ridge
#

since enchantments map is immutable

#

i cant use that method

mortal hare
#

since inventories in bukkit are synced

#

and having GUI synced for no reason is kinda useless

wraith rapids
#

is it not possible via events

mortal hare
#

the thing is my GUI api prevents dupes

#

since my items are packet based

#

even if they would get the item out of the container

wraith rapids
#

ok why are your items packet based

mortal hare
#

because they're decorations

wraith rapids
#

is your entire server on the packet layer

mortal hare
#

which shouldnt be picked up

wraith rapids
#

you could do that with events just as well though, right

young knoll
#

I cant say I've had any duping issues using standard events

mortal hare
#

ofc, but that's a guard even if you did a mistake

#

in that event

young knoll
#

Except when I realized open inventories for sleeping players is jank

mortal hare
#

it could lead to bad consequences

wraith rapids
#

i guess

#

seems kind of like overcompensating though

mortal hare
#

also you don't need to send bunch of packets

#

to the client

#

while with inventories you need to since they're just inventories

wraith rapids
#

meanwhile fucking ImageOnMap dev team refuses to patch a gui dupe issue that spawns in barrier blocks

#

because "it's a minor bug and kind of rare"

#

fucking

mortal hare
#

that's why i was inspired to do this kind of shit lol

wraith rapids
#

had to fork that piece of shit and change the barrier icon in the gui to like red glass pane

mortal hare
#

to prevent this shitty dupes

eternal oxide
wraith rapids
#

it's happening in the depths of some shit tier library they're using

#

i wouldn't be bothered to fix it either

young knoll
wraith rapids
#

have I showed you my train

sour sand
#

is there an event for when someone changes dimensions

wraith rapids
#

player world change event

#

bukkit calls dimensions worlds

sour sand
#

ok thanks

mortal hare
#

Searchup RedLib

#

they have some kind of implementation

#

what you're looking for

#

with function lambdas

young knoll
#

Ahh yeah registering an event inline would be decent

wanton cipher
#

What is plugin to make ranks apear on ur head ?/:

sage swift
#

you developing one?

#

if not, wrong channel

young knoll
#

I assume registering a bunch of listeners isn't too much different to registering one listener that calls a bunch of methods performance wise

sage swift
young knoll
#

Yeah that's basically what I wanted to do with my Map<Event, List<Consumer>>

#

So it should work well

mortal hare
wraith rapids
#

generics are funky

#

i made me a train

#

it's kind of like a linked list but every element can be of a different type

#

and it's type safe πŸ‘€

sage swift
#

isn't that like a node

wraith rapids
#

dunno, wouldn't node imply that there's more than 1 neighbor

#

this is a singly linked list so every element only points at the next element

#

i don't think it's possible to make it type safe if it's doubly linked

#

well, actually, I guess it might be possible

#

lemme give a try

quaint mantle
#

Hi, does ProtocolLib have a method that I can access to the dimension manager.
I need to send the player the PacketPlayOutRespawn packet and I need the dimension manager because of I am using ProtocolLib.

proven sierra
#

i think you get it from the NMS world

vital ridge
#

Is there like any unique stuff for every item_

#

like player has its own unique id

wraith rapids
#

define item

#

if you mean itemstack, no

eternal oxide
heavy mason
#

Is anyone familiar with splitting a large schematic into something smaller that a server can manage without panicking? I've heard FAWE is highly unstable in 1.13+ though I can't confirm but, if this is true, I would like to steer away from it. Furthermore, I'm willing to trade time for stability

#

Any help would be appreciated

wraith rapids
#

how many 5 star reviews are you willing to pay

mortal hare
#

8

#

wtf

#

i tagged you??

#

lol

#

i haven't noticed that i've tried to reply to u previously

wraith rapids
#

i can't see replies

#

ripcord is behind the times

mortal hare
#

i use lightcord

wraith rapids
#

that's electron based though right

mortal hare
#

yea

#

but ripcord is ugly as shit

wraith rapids
#

yeah, i can't really afford to run random extra browsers for every application I have open

#

limited resources and whatnot

mortal hare
#

true

wraith rapids
#

i use ripcord because it's super lightweight

#

and has good alt support

mortal hare
#

if only discord like UI existed on ripcord i would gladly switch

#

now it looks like Visual Studio 2019 lol

wraith rapids
#

i like things bare and simple

#

eyecandy is useless

#

plus being able to switch between accounts with a click is nice

#

and I don't need to deal with discord's "logged in from another location" fucknuggetry every time I use a different machine or change my ip range

#

since it uses bare auth tokens

#

no captchas or anything fucking excessive

#

you just slam the key in and you're in

#

just like god intended

compact haven
vital ridge
#

PersistentDataContainer

#

works fine

opal sluice
#

Hi, is there a way to remove the death particles of mobs ?

#

The little "poof"

#

It should be "Particles#EXPLOSION_NORMAL"

#

But cancelling this packet doesn't seems to work :/

mortal hare
#

have you tried debugging it

#

if it fires

#

?

#

what you can do instead then, if client is fucking around - just set mobs health to 1 heart before its dying

#

then play death animation

#

and after 0.5 sec send entity destroy packet

#

then kill the entity in the server

#

idk if it would fire up the entity packets

#

probs it would

#

or remove it somehow from world

opal sluice
#

Mmmh yeah

#

Maybe spigot calls it differently ?