#help-archived

1 messages · Page 89 of 1

subtle blade
#

I smell Preconditions PEEPOG

sick citrus
#

Like in an empty generator

subtle blade
#

Oh Bukkit's Chunks won't be null in any cases, no

#

Even if the chunk is empty, it's still a chunk

velvet halo
#

I meant chunk claiming in general I like nicer

sick citrus
#

Even when not loaded

subtle blade
#

If it's not loaded, Bukkit loads it

velvet halo
subtle blade
#

0 ping

#

hacking

sick citrus
#

Null safety. I like it.

velvet halo
#

I have a simple way to display a nicer border

#

Then again the method is something you guys could look into because I am just not good at vector maths

sick citrus
#

2020 and mojang didn't figure out that we want to be able to sort the scoreboard manually

storm vessel
#

I just setup bungeecord, and when I connected to my spigot server all inventories, perms, and spawn points were reset. What could cause this?

frigid ember
#

On bungee how could i disable the send message?

sick citrus
#

Sorry shade, can't help you

velvet halo
#

Why tf does scoreboard still have those ugly ass numbers on the side

sick citrus
#

Because it's the only way to sort the lines

#

🐴

velvet halo
#

You know how F3 + G shows a chunk grid

#

They could have an option like that for the scoreboard

#

to show and hide the numbers

storm vessel
#

Okay so I turned online mode back on and inventories came back

#

wtf

sick citrus
#

Or a proper empty scoreboard that you can with whatever

velvet halo
#

true

#

Anyways this is what I have for showing chunk borders that are always on the ground xD

#
Location point = new Location(location.getWorld(), location.getChunk().getX() << 4, 0, location.getChunk().getZ() << 4);
for (int x = 0; x <= 16; x++) {
    for (int z = 0; z <= 16; z++) {
        if (x == 0 || z == 0 || x == 16 || z == 16) {
            if(location.getBlockY() > 60) {
                Location newPoint = point.clone().add(x, 0, z);
                if(newPoint.getWorld() != null) {
                    int y = newPoint.getWorld().getHighestBlockYAt(newPoint.getBlockX(), newPoint.getBlockZ());
                    locations.add(new Location(newPoint.getWorld(), newPoint.getBlockX(), y, newPoint.getBlockZ()));
                }
            }
            locations.add(point.clone().add(x, 0, z));
        }
    }
}
bright forge
#

Thx for dealing with that 1-star review spammer

bronze marten
#

Also interesting they render it from bottom to top

velvet halo
#

Ugh I am so bad at vector maths

#

Yet it is easy peasy

bronze marten
#

Doing it on paper first may help

#

Code is 80% thonk

velvet halo
#

Do you know what is interesting, the border doesn't show correctly on Paper Spigot

#

but it does on normal

subtle blade
#

Thx for dealing with that 1-star review spammer
Literally the third time I've dealt with that bugger lol

#

I banned all three of his accounts

#

Unfortunately I have the pleasure of opening like 30 tabs and deleting each review manually

sick citrus
#

That's xenforo for you

bronze marten
#

Chrome likes that

sick citrus
#

Ram doesn't

#

And clever people don't use chrome.

bronze marten
#

Mozilla

sick citrus
#

#triggererd half of the server

#

But that's because they should be triggered

bronze marten
#

However V8 is really good

sick citrus
#

It's still chrome.

velvet halo
#

You using the new edge weby? 😫

sick citrus
#

I'm on Linux.

#

I'm not using the new Edge. I'm using the bleeding edge.

bronze marten
#

Telnet?

velvet halo
#

🕵️

sick citrus
#

And yes I know it uses chromiun

#

And no Frank. Links.

#

Or lynx depends on the day

bronze marten
#

Telnet is my daily driver

sick citrus
#

Ok

bronze marten
#

Brilliant piece

sick citrus
#

I feel very bad for you is this was ever true. Even for a day.

#

Windows script kiddies be like

#

Net send

#

Look I hak u

frigid ember
#

On bungee how could i disable the send message?

bronze marten
#

Well ofc i don’t use telnet

#

But openssl

#

Bcs telnet doesnt have https :(

sick citrus
#

Well yeah

#

The net is https only now

#

Thanks let's encrypt

#

You twats

#

For deprecating telnet too early.

bronze marten
#

@frigid ember you could make a log filter

#

I think such plugins exist

#

Or you could make one

frigid ember
#

how so?

bronze marten
#

Well

#

Just a bungee plugin

#

@velvet halo i would test it a bit with large claims tho, maybe you should only light up parts of the border where the player is nearby

obtuse cairn
#

Hey there.
I'm trying to find a good way to get something like this from a yaml config:

someConfig:
    key1: value1
    key2: value2

However I can't seem to find a way to do it with the recommended config library.
Does someone here happen to know a way to do it without having to reinvent the wheel?
This is for a bungee plugin btw.

frigid ember
#
Error:(13, 58) java: cannot find symbol
  symbol:   method size()
  location: class org.bukkit.entity.Player[]
``` why is this still happening?
#

i am just using spigot?

bronze marten
#

Use .length

subtle blade
#

Compiling your plugin against what and running it on what?

#

because that ambiguous call is only present in 1.7 and below

bronze marten
#

Arrays dont have .size() :)

frigid ember
#

i am using 1.15.2

#

Intellji

subtle blade
#

Plugin compiled against 1.7?

frigid ember
#

shouldnt be no.

#

1.8

bronze marten
#

Hey there.
I'm trying to find a good way to get something like this from a yaml config:

someConfig:
    key1: value1
    key2: value2

However I can't seem to find a way to do it with the recommended config library.
Does someone here happen to know a way to do it without having to reinvent the wheel?
This is for a bungee plugin btw.
@obtuse cairn you could look into MemorySection, getKeys() will get the respective keys from which you can take the values

finite belfry
#

is there any rank plugin for server networks so the ranks will be sync? I tried luckperms but it doesnt work. Any suggestions?

subtle blade
#

Double check because that's the only way you'd be getting that error

#

Compile against latest

#

(or at least minimum you support). That method was removed in 1.8

frigid ember
#

your talking about my java or spigot?

subtle blade
#

Spigot

frigid ember
#

i am using 1.15.2 spigot?

subtle blade
#

Yes but what is the plugin compiled against?

finite belfry
#

is there any rank plugin for server networks so the ranks will be sync? I tried luckperms but it doesnt work. Any suggestions?

subtle blade
#

With which API version is your plugin written?

finite belfry
#

please i need help

frigid ember
#

1.13?

finite belfry
#

and i googled it

#

is there any rank plugin for server networks so the ranks will be sync? I tried luckperms but it doesnt work. Any suggestions?

frigid ember
#

yea i am using 1.13 API

#

Choco?

velvet halo
#

@bronze marten The border will only be shown per chuink

#

not a large area

tame dagger
#

Why does that take three seconds to load?

#

My debug tells me that it took 3000 ms

rapid yacht
#

Hey, I was wanting to get into spigot plugin development and wanted to know a great place to start, I know the bare basics of java and not much else. Although I’ve dipped my toes into plugin development already. Anyone have a good place to start?

barren abyss
#

So... i have an output from the json in console.log

#

but when Im trying to print it at html it dsnt appear.. why?

frigid ember
#

Choco??

keen orchid
#

is there any rank plugin for server networks so the ranks will be sync? I tried luckperms but it doesnt work. Any suggestions?
@finite belfry you sure luckperms don’t work its what i use, are you using mysql?

finite belfry
#

yes

torn robin
#

LuckPerm’s works with sql last I checked

#

I’d make sure you configured it properly

frigid ember
#
**Error:(13, 58) java: cannot find symbol
  symbol:   method toArray()
  location: class org.bukkit.entity.Player[]``` can someone help?
velvet halo
#

I prefer to use mariadb for luckperms

lean stratus
#

does anyone know how to set up dynmap?

pallid ether
#

Hi. I´m using spigot 1.12 server. I installed a plugin "NickNamer", but i´m having a problem "[Server thread/ERROR]: Error occurred while enabling NickNamer v3.18.2-SNAPSHOT (Is it up to date?)". Could someone help me? https://hatebin.com/vywpwzudmt

wanton vine
#

How do I get dynmap to only show a certain world

lean stratus
#

oh do you know how to set it up? please help

#

@wanton vine

wanton vine
#

@lean stratus for the most part, yes

#

Dm me

frigid ember
#

@wanton vine you think you could help me by any chance

wanton vine
#

Haha

#

Just dm me

burnt dock
#

So, anyone know why my flying speed wont change with essentials?

keen compass
#

is it outdated?

burnt dock
#

i dont know

lean stratus
#

i sent you a friend request @wanton vine

burnt dock
#

other speeds work

#

cant get essentials off SpiGet anymore, but let me check

#

ok, from /ess reload, I got version 2.17.2.66

frigid ember
#

can someone help me? Error:(13, 58) java: cannot find symbol
symbol: method toArray()
location: class org.bukkit.entity.Player[]

keen compass
#

what are you trying to do @frigid ember ?

frigid ember
#

ooh thats the wrong one

#

Bukkit.getServer().getOnlinePlayers().size()

#

it gives me the same as toArray()

storm tulip
#

Would anyone know how to block creative mode nbt changes made by hacked clients?

keen compass
#

it means you have something using that address and port

storm tulip
keen compass
#

if on windows open task manager and kill the java processes

storm tulip
#

..

#

its a simple process csa

burnt dock
#

but erm, anyone know why my flying speed wont change?

#

in essentials

keen compass
#

well either that or change the server.properties

brisk mango
#

dont use essentials @burnt dock

#

easy

keen compass
#

you have something using that port, that is what that error means

#

domains != ip addresses and ports

brisk mango
#

Domain is just an domain to an ip address lol

keen compass
#

or sometimes just to other domains

brisk mango
#

and port

burnt dock
#

ehhh

keen compass
#

anyways, the port it is trying to use is 25565 which is the default MC port. Bungee normally listens on that port

#

if you want both to use that port, then you need to assign different ip addresses to them

#

would recommend using the loopback ip

#

for the MC servers

tough viper
#

How can I get all of the itemstacks in a chest?

brisk mango
#

loop through them

#

for(ItemStack stack : inventory.getContents()) {

}
#

i think

#

or just use a Consumer<ItemStack>

frigid ember
#

can someone help me? Error:(13, 58) java: cannot find symbol
symbol: method size()
location: class org.bukkit.entity.Player[]

brisk mango
#

bruh because an array doesnt have .size() method

frigid ember
#

then how would i get the amount of players lmfao

brisk mango
#

Bukkit.getOnlinePlayers().size()

#

Ah sorry @tough viper you cant use Consumer<ItemStack> on inventory.getContents() because that returns an array

#

just loop through the itemstacks in the chest

tough viper
#

alright

#

i'll iterate over it then

#

and should I use getContents or getStorageContents?

brisk mango
#

no idea

#

check the docs

#

lol

#

I think its because getContents() returns armor slots and all that shit

#

if its a player inventory

#

and getStorageContents() returns only the slots where items can be stored only, according to what ive understand from the docs

keen compass
#

I don't know what it is you are trying to do @frigid ember or what your setup is. I can only tell you what that error means.

#

You have something already on that ip and port being used

#

are you using windows or linux?

#

then open task manager and kill all the java processes you see

#

once that is done try running the application again

#

also don't double click on jars

frigid ember
#

@brisk mango thats what i am using...

brisk mango
#

okay

#

use Bukkit.getOnlinePlayers().length then

keen compass
#

click the button that says, see all processes

#

or something similar

frigid ember
#

length isnt a thing.

velvet halo
#

.size()

frigid ember
#

size doesnt work.

velvet halo
#

.<

keen compass
#

kill the java processes now

frigid ember
#

gives me a compile error

keen compass
#

now you should be able to run your application

brisk mango
#

How is it not a thing

keen compass
#

sometimes java processes get stuck in windows and you have to go in kill them sometimes. Often this happens when you double click on the jar

brisk mango
#

location: class org.bukkit.entity.Player[]

#

whatever

keen compass
#

you need to open command prompt, and run your bat file there or use the java command

frigid ember
#

tbh temedy i have no clue why it doesnt work

brisk mango
#

bruh just look in the method

#

Bukkit.getOnlinePlayers()

#

what does it return, i have no fucking clue how can not .size() be a thing as it has always been, atleast in 1.8.8 and up

#

has been always Collection<? extends Player>

#

and the decompiler says its an array

barren abyss
#

ive been trying to do something for like 3h now... and im really pissed off... im trying to get info from the api to print it on my html... and I f*cking can't... i'll share a piece of code, tellme where am I missing something or where am I failing:

function JSONRequest(){
    
    let XMLHttpRequest = require("xmlhttprequest").XMLHttpRequest;
    let request = new XMLHttpRequest();
    request.open('GET', 'https://api.spigotmc.org/simple/0.1/index.php?action=getResource&id=78993');
    request.send();
    request.onload = () => {
    let JSONFile = JSON.parse(request.responseText); // Full JSON file
    let downloads = JSON.parse(JSONFile.stats.downloads); // This gives the downloads (tried in console.log)
    document.getElementById("output").innerHTML = downloads; // Trying to print the download number in html
    }
}

JSONRequest();

pls halp🙏

frigid ember
#

i am using 1.15.2 lol

keen compass
#

do you even have the api as a dependency?

frigid ember
#

in my plugin.yml?

barren abyss
#

the info loads, but not in my page

frigid ember
#

oh

#

you talking to vo1d

brisk mango
#

🤦‍♂️

barren abyss
#

it shows in the console

keen compass
#

no I am talking to you @frigid ember you are the one with compilation errors

frigid ember
#

yes i do

#
api-version: 1.13
``` this right.
brisk mango
#

u said u have 1.15.2

keen compass
#

should be set to 1.15.2 but that isn't the cause of your problem either

#

er 1.15

#

Are you using IntelliJ?

frigid ember
#

yes.

keen compass
#

try clearing the caches and restart intelliJ

#

somewhere in the menus there is a place to clear caches

silver basin
#

File menu

keen compass
#

it should fix your problem especially if you are using maven

silver basin
#

Its called `Invalidate Caches and Restart

keen compass
#

There we go

#

Sorry I don't use that IDE, I just remember how to help with certain issues sometimes 😛

brisk mango
#

what IDE do you use then lol

keen compass
#

netbeans

brisk mango
#

ah fine, worst IDE ever

frigid ember
#

lol

silver basin
brisk mango
#

actually not

#

second worst IDE for java

#

the worst is VSC

keen compass
#

Netbeans is comparable to IntelliJ

brisk mango
#

no its not

keen compass
#

how so?

brisk mango
#

its not even comparable to eclipse so how can it be comparable with intellij

#

it doesnt even have such features as intellij does

keen compass
#

such as?

brisk mango
#

its worse than eclipse

frigid ember
#

it didnt work.

brisk mango
#

I mean intellij has so many features that no IDEs have

silver basin
#

Ok well we could discuss ide's all day buy somone could also go look at #general and give me a hint

keen compass
#

Well list some of those features so I can tell you whether or not netbeans can do it

#

I know one feature off the bat that IntelliJ has built in that Netbeans doesn't but most people don't need it lol

brisk mango
#

Does netbeans have automatic generating of constructors, setters/getters?

keen compass
#

yes

#

IntelliJ has a decompiler built in

silver basin
#

@frigid ember link me the POM.xml and the error

keen compass
#

most IDE's don't

brisk mango
#

in intellij, it gives you warnings about things that it wouldnt in netbeans/eclipse

silver basin
#

I use that decompiler all the time

brisk mango
#

I hate the fucking fernflower decompiler

keen compass
#

it gives me warnings about everything o.O

silver basin
#

oh it gets it wrong sometimes

#

but its better than nothng

brisk mango
#

I dont know about netbeans, but eclipse is slow as fuck and laggy

frigid ember
keen compass
#

main reason I don't use eclipse 😛

brisk mango
#

but from what ive heard is that eclipse/netbeans/VSC are like the worst IDEs for java

keen compass
#

Netbeans lets me configure the resources for it 🙂

frigid ember
#
Error:(17, 64) java: cannot find symbol
  symbol:   method size()
  location: class org.bukkit.entity.Player[]
``` error
brisk mango
#

i mean noone uses netbeans so maybe there is a reason for it

keen compass
#

MD uses netbeans too 😉

stone rampart
#

afaik

#

there is no reason

#

to use anything other than IDEA

#

really bigoted towards IDEs though

#

Jetbrains > Microsoft > anything else

keen compass
#

Well same can be said with Netbeans

silver basin
#

@frigid ember link the file that is causing that error

brisk mango
#

no it cant

#

because IDEA is also well designed especially for kotlin

keen compass
#

Netbeans can handle kotlin as well, just not out of the box

#

but I don't care about kotlin anyways

brisk mango
#

IDEA can handle it better

keen compass
#

probably because they are the ones that created it if I remember correctly

brisk mango
#

correct

silver basin
#

Ok so I am attempting to rollback a broken chest

               BlockState state = block.getState(); //currentstate
        state.setType(Material.Chest);
        state.setBlockData(getBlockData()); // {Block{minecraft:chest}[facing=south,type=single,waterlogged=false]}

then I go about resolving any custom changes that existed...

          ((Nameable) state).setCustomName(actionData.customName);
      }```
However what I have discovered is the state is not apparently an instance of nameable...
The state debugs at this point as 
```state = {CraftBlockState@12097} 
world = {CraftWorld@11953} "CraftWorld{name=world}"
chunk = {CraftChunk@11954} "CraftChunk{x=0z=-1}"
position = {BlockPosition@12109} "BlockPosition{x=3, y=4, z=-14}"
data = {IBlockData@12071} "Block{minecraft:chest}[facing=south,type=single,waterlogged=false]"
flag = 3```
So how do I actually achieve the goal of setting the chests custom name
Oh at the end I do call 
`        state.update(true, physics);`
frigid ember
silver basin
#

@frigid ember thats not the entire file the line numbers are off

frigid ember
#

the rest is imports

#

unless you really want them...

silver basin
#

well to me it looks as where ever the api you are using came from its corrupt

#

....runmvn compile -U

frigid ember
#

i need to install mvn

#

one sec

silver basin
#

...um yes .. hangon how was that error happening?

#

if you were not compiling with maven how were you compiling?

frigid ember
#

build

silver basin
#

...you cant use that with mvn

#

unless you set the option in tools

frigid ember
#

can i do that then?

silver basin
#

yeah let me find it

frigid ember
#
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.7.0:compile (default-compile) on project HubCore: Compilation failure
[ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
[ERROR]
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
``` thats from maven...
silver basin
#

self explanatory

frigid ember
#

ah

#

ok i built using the way you showed

#

it worked !

#

now i am getting errors...

#

Error:(7,36) java: package net.minecraft.server.v1_7_R4 does not exist

#

@silver basin

ocean sierra
#

Hi, izzit possible to have spigot and forge server tgt?

silver basin
#

@frigid ember there you will need to paste the entire error aas well as the file its occuring in

frigid ember
#

error is because it requires the mc server

#

there is 41 compile errors

silver basin
#

is this your plugin?

frigid ember
#

yes.

silver basin
#

...is it on github

frigid ember
#

no?

#

why?

silver basin
#

so I could see the whole code base

#

i mean you dont have net.minecraft.server as a dependency so thats a problem to start with

#

but honeslty ....you need to reconsider why you need to use NMS

frigid ember
#

tbh i dont know what the maven is for a net.minecraft.server

silver basin
#

well there is no repo for it

#

typically if we used nms we would depend on

<artifactId>spigot</artifactid> as opposed to the spigot-api

#

the spigot jar has the nms inside it

#

but you have to ?buildtools

#

?buildtools

#

....really cafebabg

#

!buildtools

frigid ember
#

lol

silver basin
#

!

#

!bt

#

?bt

worldly heathBOT
silver basin
#

there it is

frigid ember
#

ok one sec i am building

keen compass
#

does intelliJ provide a JDK?

#

o.O

frigid ember
#

i dont think so

keen compass
#

then you are going to need that as well

#

to compile stuff

silver basin
#

Intellij doesnt provide a JDK actually

#

...you just might not want to use it

#

...you should install one yourself

keen compass
#

ah

silver basin
#

the JDK provided by Intellij is JDK 11 and its customised

keen compass
#

interesting that it is customized

frigid ember
#

Ok, i finished the build tools what do i need from this?

silver basin
#

you should get 8

keen compass
#

I should make my plugins only compatible with 11

#

see how many servers decide to update their JVM

#

XD

silver basin
#

....dont be suprised if you get some wierd security errors

keen compass
#

Java 9 does that

silver basin
#

Crypto is so freakin inconsistent across jvms

keen compass
#

haven't had any other versions past that raise any weird security stuff

#

currently I run MC on Java 14 just fine 😉

silver basin
#

yeah but you know what bstats shows re which jvm is most common

keen compass
#

only because developers don't push for using updated LTS's lol

silver basin
#

maybe

keen compass
#

if many plugin developers decided to just compile against 11 many servers will follow suit as well

#

but don't worry that will happen here towards the end of the year when Java 8 is EOL

silver basin
#

I had an error _ I was using 1_8_161 server had moved to 201... and oracle changed the default crypto size

#

...not even a major incrementation to let you know

keen compass
#

interesting

frigid ember
#

so

keen compass
#

you are going to need a JDK

silver basin
#

...we cant write a plugin for you @frigid ember

keen compass
#

choose which ever you want, most people use Java 8 others use more updated versions. Just don't try to use something below jdk 8

frigid ember
#

what did i need build tools for?

silver basin
#

You should learn to compile java first

keen compass
#

you need the spigot.jar for nms

#

only buildtools provides that jar

frigid ember
#

spigot-1.15.2.jar?

silver basin
#

correct

frigid ember
#

What will i do with such jar

silver basin
#

but buildtools will install it in your local repo

keen compass
#

if you use the spigot jar, you don't really need to have the API as a dependency either

silver basin
#

and let you use it as a dep

frigid ember
#

dep as a maven?

#

or just lib

silver basin
#

...I think you need a tutorial on java compilatio

frigid ember
#

seriously i do

silver basin
#

yeah this isnt the place to get one

keen compass
#

they need a tutorial on setting up a workspace for java

#

think there is one on spigot

silver basin
#

yeah I think it will go over his head because he need to understand differences between local non maven projects and maven

frigid ember
#

i dont thats the thing maybe if someone would explain it would be alot easier to understand.

silver basin
#

we dont use lib in maven

#

because its not reproducible

frigid ember
#

Ok.

#

So how would i use the nms as a dep?

#

in maven

silver basin
#

same way you added the spigot-api dep

frigid ember
#

i use the minecraft development so i dont add it.

silver basin
#

yeah well that didnt teach you anything and now you need to learn about maven dependency

frigid ember
#

for

#

<groupId></groupId>
<artifactId></artifactId> do i just put the name of the jar?

silver basin
keen compass
#
<groupId>org.spigotmc</groupId>
<artifactId>spigot</artifactId>
<version>1.15.2-R0.1-SNAPSHOT</version>
<scope>provided</scope>
silver basin
#

please actually read that

frigid ember
#

i understand that part now. but i dont get how its going to find this jar off my desktop using ```xml
<groupId>org.spigotmc</groupId>
<artifactId>spigot</artifactId>
<version>1.15.2-R0.1-SNAPSHOT</version>
<scope>provided</scope>

keen compass
#

because that is what maven does

silver basin
#

....because you used buildtools like we told you too

keen compass
#

maven has a local repo where it will search first and then it will attempt to search remote repos afterwards if it still didn't find it

silver basin
#

buildtools will populate the local repo

keen compass
#

but because buildtools was ran, buildtools put it in the local maven repo for you

silver basin
#

🥇

frigid ember
#

where would it put that repo i am a dumbass tbh

silver basin
#

the repo is automatic but its located at <HOME>/.m2 usually

keen compass
#

on windows it is located at C:\users\(user for your desktop)\.m2

silver basin
#

I dont think thats correct frost

#

its never been in documents for me

frigid ember
#

its under the user not documents

#

.m2 is under user, then inside it has a repository

keen compass
#

fixed 😛

silver basin
#

👍

#

dont manually put stuff in there @frigid ember

#

its not for manual stuff

frigid ember
#

yes i get that.

keen compass
#

I mean you could, but odds are maven will complain about it or ignore it

silver basin
#

or corrupt itself

frigid ember
#

so what would i do now?

#

just compile?

keen compass
#

did you get a JDK installed?

frigid ember
#

i should have one

#

let me see

#

yes i have jdk1.8.0_241

keen compass
#

perfect. Now follow that wiki guide that was posted earlier

#

and you should be able to compile afterwards 😄

silver basin
#

but again ...using NMS is NOT for the faint hearted

#

keep in mind every time spigot is updated the NMS might change

#

even in between major versions

keen compass
#

might change
It will change XD

frigid ember
#

am i retarded or it just gives the same thing?

silver basin
#

sorry same thing how

frigid ember
#
        <dependency>
            <groupId>org.spigotmc</groupId>
            <artifactId>spigot</artifactId>
            <version>1.15.2-R0.1-SNAPSHOT</version>
            <scope>provided</scope>
        </dependency>``` you told me to put this in the POM.xml right and then compile pretty much and it still gibes the nms
keen compass
#

did you follow the guide from the wiki?

#

can't be skippings steps now

silver basin
#

?paste the compile log

worldly heathBOT
frigid ember
#

compile log is the same..

silver basin
#

...just paste it

#

the WHOLE log

frigid ember
#

how do i get the full log?

#

oh

silver basin
frigid ember
keen compass
#

I see you are trying to update something

silver basin
#

me?

keen compass
#

no not you

#

the one that obviously needs help

silver basin
#

😛

frigid ember
#

i am obviously just stupid

keen compass
#

you have to go fix the imports in the classes

#

notice it says 1_7_R4

silver basin
#

no your just not experienced

keen compass
#

it needs to be changed to 1_15_R1

frigid ember
#

oof let me change the build to 1_7R4 for a reason

keen compass
#

no its not a build thing

silver basin
#

no you dont have that version

keen compass
#

its in the class files

silver basin
#

every class import has to be updated

frigid ember
#

ok

keen compass
#

at this point IntelliJ should have marked the classes in red

#

that have issues

frigid ember
#

tbh with you the plugin is for 1.8/1.7

keen compass
#

Well, you are going to need to hunt down 1.7 CB then

#

wonder if CB still hosts that version

frigid ember
#

CB?

#

craft bukkit

#

oh

keen compass
#

1.7 and below is pretty much hard to get your hands on as only very few people actually have the sources for those versions lol

#

well I should say, pretty much hard to get from a reputable source

frigid ember
#

will 1.8 do the job?

keen compass
#

possibly. Depends on what that plugin you are trying to compile does

#

and whether or not updating the imports is sufficient

frigid ember
#

most of the nms is for tablist

keen compass
#

you might even have to remove class files if they are specifically for 1.7

#

just depends

silver basin
#

I have 1.7.10

keen compass
#

you have the sources ? or just the jar? lol

silver basin
#

in my repo

frigid ember
#

...

keen compass
#

I think I still have the sources for 1.7

silver basin
#

....do you dare to share

#

that would be very naughy

frigid ember
#

yes yes naughy be good

keen compass
#

think I might have it stored on an external somewhere

#

found CB 1.10

#

but I am pretty sure I have earlier versions going back to 1.5

frigid ember
#

yea i need 1.7.10

keen compass
#

well, I can give you my repo link since I have it there, but I know have the sources around lol

#

@silver basin does intelliJ install dependencies for you?

#

like if you have the jar, can you tell intelliJ to import it into maven repo that is

frigid ember
#

yea intelj sync with your pom.xml and installs for you

keen compass
#

I know it will pull dependencies from remote repo's

#

but that isn't what I am asking though

#

I know how to install artifacts with the maven command, but I don't rbuh has maven installed

#

so, curious to know if IntelliJ will install artifacts for you

frigid ember
#

i have maven installed.

#

hmm i have maven installed too

keen compass
#

then follow that guide to install the CB jar into your local repo

frigid ember
#

hmm ok

keen compass
#

o.O

frigid ember
#

tbh i cant read that lmfao

keen compass
#

then probably better then if you let intelliJ install it for you lol

frigid ember
#

how tf does Intellij do that because rn intellij just likes to fuck with me lol

silver basin
#

@keen compass Intellij will parse a POM and autoload the deps

#

ie it will actually resolve the project without using maven compile

#

if your asking will it automatically install a file in a maven repo no

#

it wont

keen compass
#

Yes, but the artifact isn't going to resolve though if they don't have the dependency in the local repo and if it doesn't exist remotely

#

I was asking how do you tell IntelliJ to install one

#

XD

silver basin
#

shrug I use maven

keen compass
#

in netbeans I just right click on the dependency to install it locally if I have a jar I want to specify

silver basin
#

mvn install -file

keen compass
#

probably just better off specifying my repo then as a repository in the pom @frigid ember

frigid ember
#

?

silver basin
#

I would agree

frigid ember
#
        <repository>
            <id>spigotmc-repo</id>
            <url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
        </repository>
``` like this?
keen compass
#

yes, copy that and paste below that, rename the id and put this URL

<url>https://repo.frostalf.net</url>
silver basin
#

yes but that doesnt have any nms jars

#

...the spigotmc one

keen compass
#

yeah the spigotMC one isn't the issue

frigid ember
#

whats the ID?

keen compass
#

whatever you want to name it

frigid ember
#

ah ok

silver basin
#

...the id can be whatever you want

#

it only matters when you deploy

keen compass
#

but putting my repo in there will help with the 1.7 resolving issue 😛

#

if you run the build process it should pull that into your local repo

silver basin
#

then u can remove it if you want

frigid ember
#

do i need to download the jar?

silver basin
#

maven does it for you

keen compass
#

maven will download it and install it into your local repo for you

silver basin
#

...because frost should not have those jars publically available 🍎

#

😛

keen compass
#

1.7 isn't subject to the DMCA

silver basin
#

wasnt it post 1.7.4

keen compass
#

1.7 and below are exceptions only applies to 1.8 and beyond

silver basin
#

so 1.7.10 was

frigid ember
#

so i put the repo

silver basin
#

Idk

frigid ember
#

then i compile?

keen compass
#

1.7.10 and below can still be distributed as they are not subjected to the DMCA

#

it was everything beyond that

#

But, I mean, if someone wants to send me a DMCA they can though

#

have yet to get one XD

silver basin
#

lol

keen compass
#

build might not be successful when you compile but that isn't import

silver basin
#

did you see the troll ...someone posted that MD-5 had a warrant out from Mojang...and 1/2 the forge team had been arrested

keen compass
#

the important thing is getting that dependency

frigid ember
#

ok yea the build didnt work but now what.

keen compass
#

@silver basin Private entities can't issue warrants fyi

silver basin
#

well they can ...sort of ...

keen compass
#

they can issue summons

#

not quite the same thing

silver basin
#

they issue the DCMA - as a summons - the person doesnt respond...t

#

they get a warrant

keen compass
#

no that isn't how that works

#

lol

silver basin
#

it does here

#

where md5 is

keen compass
#

Well, Mojang is in the Netherlands isn't it?

silver basin
#

if you fail to appear it court for a summons in au ...you get issued with a warrant

keen compass
#

Not sure how that works between countries

silver basin
#

well mojang would prosecute him under AU law

#

for extradition

#

in theory

keen compass
#

either way Highly doubt that is the case

silver basin
#

oh it was a complete troll

keen compass
#

I could see Mojang going after someone in the same place they are at

#

but in a different country they are not likely to do so unless you are doing something pretty severe that it warrants them to spend that kind of money on court

#

international lawsuits are not cheap at all

#

Not that is an issue for M$

#

but even they are not known to just outright go after individuals over something petty

#

@frigid ember once maven pulls that dependency in, you can either remove my repo or keep it either way it doesn't matter. My repo is public 😉

frigid ember
#

then what would i do?

keen compass
#

well once you have the dependency, fix whatever problems intelliJ says there is

frigid ember
#

i dont think i have the dep

keen compass
#

is it listed in the pom?

frigid ember
#

no..

keen compass
#
<groupId>org.bukkit</groupId>
<artifactId>CraftBukkit</artifactId>
<version>1.7.10-R0.1-SNAPSHOT</version>
<scope>provided</scope>
#

put that as another dependency

#

and then run the build process and then it should pull it in

frigid ember
#

not found

keen compass
#

should have found it, especially if you have my repo listed o.O

frigid ember
#

nope..

vernal spruce
#

Hmm while on the topic,whats diff between maven dep and library one?

frigid ember
#

Frostalf its in my local

keen compass
#

nice so intelliJ did grab it

frigid ember
#

Nope

keen compass
#

but you said its in your local repo

#

o.O

frigid ember
#

look at the screenshot?

#

am i wrong?

keen compass
#

try reloading the pom in intelliJ

frigid ember
#

nope.

keen compass
#

@vernal spruce there isn't one. Just that maven takes care of putting it on the class path for you vs you doing it yourself. Also maven makes it easier to update your dependencies if you wanted to change the version because the maintainer of that dependency updated it. instead of you manually grabbing it. Also if the project is a public one. IE on github you don't need to distribute all the jars for your project if you use maven.

frigid ember
#

i only have 1.8.8 craftbukkit

vernal spruce
#

Idk do apis usually change that much to affect it though?

#

So far the apis i used remained the same for years

keen compass
#

ok manually download the jar. Where you put it, right click in that directory and type
mvn install:install-file -Dfile=craftbukkit-1.7.10-R0.1-SNAPSHOT.jar -DgroupId=org.bukkit -DartifactId=craftbukkit -Dversion=1.7.10-R0.1-SNAPSHOT -Dpackaging=jar

frigid ember
#

?

#

Where i put it?

keen compass
#

well when you download something

frigid ember
#

oh

keen compass
#

it gets stored somewhere

frigid ember
#

where do i wanna put it?

keen compass
#

anywhere doesn't really matter

#

just as long as you can right click in that directory and open command prompt

frigid ember
#
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-install-plugin:2.4:install-file (default-cli) on project standalone-pom: The specified file 'C:\Users\s1025\Desktop\CraftBukkit\craftbukkit-1.7.10-R0.1-SNAPSHOT.jar' not exists -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
'cmd' is not recognized as an internal or external command,
operable program or batch file.```
keen compass
#

ah

#

rename the jar you downloaded

#

remove the last bits of numbers from it and the - after SNAPSHOT

frigid ember
#

huh

#

what i got noting?

keen compass
#

the CB jar you downloaded has extra numbers in its name

frigid ember
#

i copied what you sent?

keen compass
#

yes I know, but you need to download the CB jar from my repo first

vernal spruce
#

Oh boy..

frigid ember
#

oh i am retarded

keen compass
#

but there will be extra numbers added to its name

frigid ember
#

yes

keen compass
#

just remove the extra stuff that is after SNAPSHOT in its name and then re-run the command I told you

frigid ember
#

btw there is no SNAPSHOT

keen compass
#

oh

#

guess there is not

frigid ember
#

should i add SNAPSHOT

keen compass
#

mvn install:install-file -Dfile=craftbukkit-1.7.10-R0.1.jar -DgroupId=org.bukkit -DartifactId=craftbukkit -Dversion=1.7.10-R0.1-SNAPSHOT -Dpackaging=jar

vernal spruce
#

Wait 1.7

keen compass
#

yeah, person needs 1.7 CB for whatever project they are trying to compile

vernal spruce
#

Let me get the torches and pitchforks out

frigid ember
#

build success

keen compass
#

ok now the jar is in your local repo 😄

frigid ember
#

ah good

keen compass
#

ok, now we can get back to intelliJ you can try compiling now and see if it works

#

if it doesn't it should tell you what needs fixing

frigid ember
#

only 1.8.8 is still coming up on maven

vernal spruce
#

Also why not simply add the jar instead? It wont ever get updated..

keen compass
#

well they are using maven

#

can't add the jar and use maven at the same time don't think o.O

#

but I also never tried that either

frigid ember
#

its in my local repo i am gonna restart intellij

keen compass
#

I am surprised I am even able to help this much considering I don't even use IntelliJ 😛

frigid ember
#

ah fuk

vernal spruce
#

IDEs are all the same mostly..

keen compass
#

well not really, in Netbeans I could just right click on the project to install artifacts with maven

frigid ember
#

i could just add his source to my source tbh

#

like i did for the tablist

silver basin
#

you can

#

maven can use system libs

#

@vernal spruce

#

I just dont recommend it

frigid ember
#

how?

hoary parcel
#

You can also just install it into your local maven repo

frigid ember
#

i am retarded and still dont understand maven

silver basin
#

Please dont tell me your copying Hub - All in one Hub Core 1.7.x - 1.13

#

because just to be clear the authors licence doesnt allow it...(even tho all bukkit plugins should be GPL)

keen compass
#

well, if you been paying attention to everything we have told you thus far

#

you should be able to do some of these things on your own now

#

discord keeps a chat history too, so can just scroll back up for references lol

frigid ember
#

yea no

#

@silver basin

#
Error:(45,69) java: cannot find symbol
``` ?
#

Heya,

Looking to upload my first premium resource. If I set a price now, am I able to increase/decrease that price in the future?

tiny dagger
#

yes

#

but

#

not over the limits

#

i think is 20 bucks max

frigid ember
#

Sweet, that's fair enough 🙂

#

Thanks

#

@keen compass yo

#
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.7.0:compile (default-compile) on project HubCore: Compilation failure: Compilation failure: 
[ERROR] /C:/Users/s1025/Desktop/mcp908/eclipse/HubCore/src/main/java/me/l3ilkojr/hubcore/TabProvider/Azazel.java:[67,69] cannot find symbol
[ERROR]   symbol:   method removePlayer(net.minecraft.server.v1_7_R4.EntityPlayer)
[ERROR]   location: class net.minecraft.server.v1_7_R4.PacketPlayOutPlayerInfo
[ERROR] /C:/Users/s1025/Desktop/mcp908/eclipse/HubCore/src/main/java/me/l3ilkojr/hubcore/TabProvider/Azazel.java:[86,61] cannot find symbol
[ERROR]   symbol:   method getVersion()
[ERROR]   location: variable networkManager of type net.minecraft.server.v1_7_R4.NetworkManager
[ERROR] /C:/Users/s1025/Desktop/mcp908/eclipse/HubCore/src/main/java/me/l3ilkojr/hubcore/TabProvider/tab/Tab.java:[46,69] cannot find symbol
[ERROR]   symbol:   method removePlayer(net.minecraft.server.v1_7_R4.EntityPlayer)
[ERROR]   location: class net.minecraft.server.v1_7_R4.PacketPlayOutPlayerInfo
[ERROR] /C:/Users/s1025/Desktop/mcp908/eclipse/HubCore/src/main/java/me/l3ilkojr/hubcore/TabProvider/tab/Tab.java:[93,78] cannot find symbol
[ERROR]   symbol:   method getVersion()
[ERROR]   location: variable networkManager of type net.minecraft.server.v1_7_R4.NetworkManager
[ERROR] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
keen compass
#

hmmm, they probably used spigot 1.7

#

which I don't have =/

frigid ember
#

how could that change something?

keen compass
#

because spigot and craftbukkit are not exactly the same

vernal spruce
#

oh yeah

#

there is quite some differences

tiny dagger
#

not that many anymore tho

#

bukkit is the api

vernal spruce
#

yeah but 1.7..

tiny dagger
#

spigot is the performance side

#

oh

#

1.7

vernal spruce
#

yeah...

frigid ember
#

well fixed it all and added all deps thru maven

#

Is there an open source Discord bot to verify Spigot account -> Discord?

#

@frigid ember only link or sync ranks?

#

Syncing ranks would be nice, so I can know what premium plugins of mine that they own

#

wait a sec im searching mine

#

Ah, I see. I'm looking for a plugin that specifically syncs Spigot accounts with Discord. Like what @tawdry lily does.

#

ah sorry

#

no worries 🙂

#

i think thats something only spigot needs

#

anyone know how to check if player has premium minecraft account or not useing mojang api?

#

anyone know how to check if player has premium minecraft account or not useing mojang api?
@frigid ember I think only premium accounts can access multiplayer

opal bay
#

why would you need to know that information abhiram?

frigid ember
#

i am makeing an Login security plugin for cracked server if player has premium account then auto login

#

that how that plugin works

#

i am makeing an Login security plugin for cracked server if player has premium account then auto login
@frigid ember Non premium accounts are demo right? As far as i know can the demo only access singleplayer.

opal bay
#

When a server is in offline-mode someone can join a server without having the correct credentials

frigid ember
#

yes

#

When a server is in offline-mode someone can join a server without having the correct credentials
@opal bay Ah you mean bots?

#

ok

#

that why i am makeing login security

#

no

opal bay
#

I think it's best if you used authme instead

frigid ember
#

yea but i want auto login

#

and auth me dosnt support 1.15.2

#

@frigid ember you can use tlaucher and other clints to play on cracked servers

#

@frigid ember its open source. Just take some code from it.

#

@frigid ember it also support AuthME reloaded

hoary parcel
#

Haha

keen compass
#

offlinemode isn't supported

hoary parcel
#

Offline servers

frigid ember
#

Offline servers
@hoary parcel bungeecord?

opal bay
#

from what they're saying, they're not using bungeecord

#

either that or their bungeecord proxy is in offline-mode

hoary parcel
#

Bungee is online mode

#

You just move auth up to the proxy

frigid ember
#

the plugin also supports BungeeAuth

opal bay
#

🤔

hoary parcel
#

Or you could just only use bungee in online mode and not worry about shit like that

frigid ember
#

Or you could just only use bungee in online mode and not worry about shit like that
true

hoary parcel
#

If you support piracy you are not welcome here

#

Or in any part of the community

frigid ember
#

??

#

i just helped someone with his/her problem

#

whats the problem?

#

i dont support but just wanna make plugin for servers

hoary parcel
#

whats the problem?
@frigid ember cracked servers are the problem

keen compass
#

by making plugins that support offline mode means you support piracy

#

so, if you don't support piracy you wouldn't support offline mode either XD

opal bay
#

that's some killer logic

frigid ember
#

well the spigot support piracy remove online mode from server.properties xd

hoary parcel
#

No, offline mode has it uses

#

For you know, being offline

frigid ember
#

what use?

hoary parcel
#

But you shouldn't run a public server without auth

tiny dagger
#

or testing

#

i have a bot creator to test my minigames with

hoary parcel
#

Well, I wrote code on a plane before, need offline mode for that for example

opal bay
#

wait since you can't use auth, would it mess up plugins that entirely depend on uuids?

tiny dagger
#

no

opal bay
#

oh alright, that's good

hoary parcel
#

Yes, in offline mode uuids are different

opal bay
#

oh no.

frigid ember
#

then make a extra spigot server software for developers which has offline mode

hoary parcel
#

They are v3 uuids, and generated based on the name

tiny dagger
#

yeah they are offline so duplicates entry

#

i made a swapper for someone tho

#

to port all that from offline to premium and so forth

keen compass
#

Mojang is the one that added offline mode which has a very specific use(s)

#

generally spigot doesn't remove functionality if its a vanilla behavior

frigid ember
#

is there a way i can get the amount of keys in a section of a config?

tiny dagger
#

yes

keen compass
#

getConfigurationSection("section you want").getKeys(true).size()

sturdy oar
#

don't offline mode uuids get generated this way:

UUID.nameUUIDFromBytes(("OfflinePlayer:".concat(name)).getBytes(Charsets.UTF_8))
tiny dagger
#

yup

sturdy oar
#

Spark maybe

#

the hell is that

#

yeah remove it

#

that thing shouldn't exist to be honest

keen compass
#

I never seen t hat before o.O

sick citrus
#

Delete the chunk

#

And regen it

#

Oh it's a plot

#

Delete the plot

frigid ember
#

lol someone fucked you with that one hard

sturdy oar
#

are you giving worldEdit to normal users?

#

I wouldn't give worldedit not even for 1000€ on my server

sick citrus
#

Ban him

frigid ember
#

just enable the clock it will break if you set two redstone torches on two different corners of the clock making his stuff useless

sick citrus
#

Just ban the guy

#

Rank or not

frigid ember
#

Why do you give worldedit to users though?

#

eula?

#

Not a doctor lol

sick citrus
#

Don't blacklist the block

#

or just block redstone altogether

#

I believe it's all well described in the spigot page.

tulip pendant
#

Anyone wanna work as Builder for my server dm meeee!

sturdy oar
#

use the recruitements forum

keen compass
#

?services

worldly heathBOT
cursive dock
#

how do I .. purchase a premium plugin? Each time I try to purchase I just get a popup and nothing else happens:

#

nvm, I guess the person might have an issue with whatever their merchant service is

ancient ridge
#

yeah looks like a problem specific to them

frigid ember
fiery scroll
velvet halo
#

Since itemstack is ConfigurationSerializable I think it would best to utilize that and then create a configuration section for a keyset.

#

Why exactly do you want to encode and decode the inventory?

fiery scroll
#

So basically, the idea is that each player will get access to a number of 'vaults', which are just inventories. I want to make sure those inventories are persistent across server restarts etc. So each player can have like 14 different inventories associated to them

#

I was unsure whether using the ConfigurationSeriealizable would work if I had multiple things I wanted to check (such as bankID and inventory)

#

I looked into using gson but was getting issues with StackOverflowExceptions and I couldn't figure out what my issue was

velvet halo
#

You could make an encapsulation class with an int for bankid and a Set of itemstacks using gson 😛

#

I made a JsonStorage class if you want to take a look

fiery scroll
#

I actually saw that Husker, but wasn't sure how best to fit it with my needs 😛

#

I have a Bank class that looks like this, would this work with what you're suggesting?

public class Bank {
    private int bankID;
    private List<ItemStack> items;

    public Bank(Integer bankID, List<ItemStack> items) {
        this.bankID = bankID;
        this.items = items;
    }

    public Integer getBankID(){
        return this.bankID;
    }
    public List<ItemStack> getItems() {
        return this.items;
    }
}```
velvet halo
#

Is this meant to be more of like a bank account that is linked to a player?

fiery scroll
#

Think vault rather than bank account

#

but yes

#

Each player can purchase a new "vault" which is an empty inventory they can store items in

#

they can have up to 14 "vaults"

velvet halo
#

Alright a great solution for this is to use a Guava Cache. Since you don't want to store all of this in memory

fiery scroll
#

Ah, I'm not familiar with that

velvet halo
#

It is not difficult at all

#

I can teach you here really quick

fiery scroll
#

sure

velvet halo
#

So since spigot api already has google guava built in you also don't have to add extra dependencies or shade anything into your jar which is a huge plus.

fiery scroll
#

that's always a good thing 🙂

velvet halo
#
//This is how you declare a cache 
//I use it similar to how a map would work.
private final Cache<UUID, Set<User>> usersCache;
#
//You do this in a constructor or method to instantiate

//This is how you can assign a cache by making a builder
usersCache = CacheBuilder.newBuilder()
        
        //When you write or add data to a cache you can set an expiry time. 
        //After 5 minutes it will clear an element that was cached.
        .expireAfterWrite(5, TimeUnit.MINUTES)
        
        //You want to create a listener when a cache expires or you invalidate a cache and then clean it.
        .removalListener((RemovalListener<UUID, Set<User>>) notification -> {
            
            //notification is pretty much the variable for the cache.
            //notification.getKey() will return uuid;
            //notification.getValue() will return Set of users.
            
            //We write our data to the cache for the player that we cached data for.
            JsonStorage.write(getPath(plugin, notification.getKey()), notification.getValue());
        }).build();
#
private Set<User> asSet(UUID uuid) {
    try {

        //The cache checks if the key (UUID) is already cached.
        //If it is, it returns the data from the cache
        //else it adds to the cache

        return usersCache.get(uuid, () -> { //UUID here is the key

            //So when a key isn't cached you write to the cache
            //We read from our json file.
            Set<User> users = JsonStorage.read(getPath(plugin, uuid), new TypeToken<Set<User>>() {}.getType());
            if (users == null) users = new HashSet<>();
            return users; //We return the value for the key.
        });
    } catch (ExecutionException e) {
        return new HashSet<>();
        //Worst case scenario we return a new hashset if something has gone wrong.
        //This mainly happens when you haven't done file reading correctly in this case.
    }
}
#

I hope this makes a bit of sense 😬

fiery scroll
#

Not immediately, but I'll have a read through and see if I can figure it out

velvet halo
#
//We do this method onDisable just to be sure all the cached data is saved properly.
public void serialize() {
    //We invalidate the cache and expire all entries.
    usersCache.invalidateAll();

    //We have to do this because otherwise the removal listener does not get called.
    usersCache.cleanUp();
}``` Lastly we do this method just to be safe.
#

This is in your onDisable function to make sure all our data gets serialized from the cache when the server shutsdown

#

It is wise to use a cache for thinks like reading big chunks of memory.

#

If you have 40 players online with 14 inventories stored and each inventory has like 24 itemstacks

#

That is a big chunk of data

fiery scroll
#

yeah, that makes sense

velvet halo
#

Players are not going to open all their bank vaults, maybe just the items they need

#

Then after 5 minutes it is cleared.

#

They also don't need access to that data all the time.

#

I can help you figure it out for your system btw. Feel free to pm me.

#

Sadly I have to head of now 😦

fiery scroll
#

I'll definitely give you a shout if I need more help with this, thank you for helping 😄

brisk mango
#

@fiery scroll an question, why is that integer in the declaration primitive type and in the constructor and return method its non-primitive?

#

lol

fiery scroll
#

you know, that's a great question - I forgot to change one of them

brisk mango
#

I mean Integer is just an wrapper

fiery scroll
#

oh right, yah (that's what I get for being braindead)

frigid ember
#

How do you cancel a packet with netty(nothing to do with spigot), I am using the latest version of netty.
How do you cancel a ByteBuf or how do you do it with the channelhandlercontext

#
 @Override
    public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception {
        ByteBuf buf = (ByteBuf) msg;
        if(someReason) {
          //cancel
        }
    }
#

How do I cancel for example

carmine matrix
#

Hello, can someone help me with [Crackshot] plugin plz.

jaunty night
#

@frigid ember, just don't do anything with the packet so just return the function? unless I'm misunderstanding.

frigid ember
#

how do i let the client know

#

that it has been cancelled

jaunty night
#

send a packet back to say "Hey, I cancelled this"

frigid ember
#

after the client sends the packet, if i check
ChannelFuture f = channel.writeAndFlush(packet);
if(f.isCancelled())

#

it false

#

f.isSuccess() is true

#

sending a packet back is going to make the server do more work

#

imagine handling 1000 players and i for some reason need to cancel a lot of packets

#

it will f the server

#

sending to each client?

#

is there no other way, so the client can check if(f.isCancelled()) //and it says true

#

@jaunty night

jaunty night
#

Hm..

#

I don't really understand what the goal here is, so maybe you can design the client in a way that the client so it doesn't need to know that the packet was cancelled?

frigid ember
#

the client needs to know

#

for example in bukkit, when you try teleport a client back

#

you cancel

#

without letting the client know it makes no sense, his position won't be the even close to as the server expected

jaunty night
#

the thing is

frigid ember
#

craftbukkit doesn't send a packet to the client for each cancel

jaunty night
#

in bukkit when you teleport a client it doesn't actually move the player until it knows the event hasn't been canceled

#

so for example

#

it first sends the onTeleport event with the location

#

then it checks if it has been canceled

#

if it has then it stops the teleportation

frigid ember
#

PlayerMoveEvent is a good example

jaunty night
#

if it hasn't then it continues running

frigid ember
#

cancellign it must inform the player that something has been cancelled

#

no?

#

ooh

#

areu saying in playermoveevent bukkit sends teleport

jaunty night
#

I mean unless it follows the same logic I outlined

#

but that will be lag fest

#

although PlayerMoveEvent is known for being a lag fest

frigid ember
#

tell me

#

is it how bukkit does it

jaunty night
#

I don't know

frigid ember
#

to cancel playermoveevent it sends some tp packet

#

and doesn't actually cancel

#

...

#

well then the problem doesn't solve, i still am doing extra work server side

#

yk what i mean

jaunty night
#

The teleportation packet is different from the move packet

frigid ember
#

ik

#

im not blind

#

xd??

#

just like it would be possible to send a teleportation packet, as a disguide to "cancel" the move packet

brisk mango
#

@jaunty night PlayerMoveEvent is fine

frigid ember
#

temedy

#

how do I cancela bytebuf packet

jaunty night
#

Ehh, it's known for being quite a lag fest if it's used incorectly

frigid ember
#

in netty they mention some bytebuf.discard() method but i don't know what it does

#

netty docs

brisk mango
#

tell me how can u use PlayerMoveEvent incorrectly, lol

frigid ember
#

I tried discarding and it didn't work

brisk mango
#

what are you doing @frigid ember

frigid ember
#

cancelling a packet

#

with netty 4.1-final

jaunty night
#

PlayerMoveEvent is run whenever a player move packet is sent (duh) but consider that a player movement is whenever moves by a 0.1th of a block it can get considerably laggy

frigid ember
#

can we stay on topic bruh

jaunty night
#

especially because holding Ws causes swafts of move packets

brisk mango
#

bruh it cannot get laggy

jaunty night
#

which is fine that's intended

frigid ember
#

are you guys going to answer my q or na

brisk mango
#

hold on

jaunty night
#

however, if you have too much running in a PlayerMoveEvent it gets quite laggy

frigid ember
#

nah

#

.

brisk mango
#

bruh stop saying non-senses it cannot get laggy with the move event

#

i know spigot performance is shit but it cannot

frigid ember
#

so use paper

#

👍

brisk mango
#

both are shit

#

imo

jaunty night
#

Retro here's my final answer if it's running on a per client basis I'd say just send a response packet

frigid ember
#

is there a more efficient way

#

i already got that i can send a response

hoary parcel
#

Dafuq is going on here

#

Stop spreading bullshit guys

jaunty night
#

Lemme complete sentence mini I was gonna tie it back and say I don't have enough information to know what he is attempting to do.

frigid ember
#

ok so no one respond, thanks atom u helped as much as u could

#

ty

#

bye

hoary parcel
#

I wasn't meaning you atom

jaunty night
#

ah

brisk mango
#

who is spreading bullshit then @hoary parcel

hoary parcel
#

bruh stop saying non-senses it cannot get laggy with the move event
@brisk mango ^

brisk mango
#

thats true though, it cannot lol

hoary parcel
#

Of course it can

#

Try doing a thread sleep in a move event

brisk mango
#

Why would you do Thread.sleep() LOL

#

you know that just shuts off the main thread

hoary parcel
#

To simulate a demanding task

brisk mango
#

u would never use Thread.sleep() though

jaunty night
#

A better player movement event is just to do a Runnable and put that on a loop

#

so it doesn't run whenever a player moves 0.1 of a block

hoary parcel
#

Nah, the event is fine, just make sure you return early and don't do heavy stuff

brisk mango
#

I mean you're right if you need something that doesnt run instantly, but for flyhack detections and etc its good to use the PlayerMoveEvent

hoary parcel
#

But when you do heavy stuff, it will bite you in the ass

brisk mango
#

bruh I still dont get your point, why would you use Thread.sleep() do to a delayed task lol

jaunty night
#

Yandere dev 1000 line update() unity function

#

@brisk mango 🤦‍♂️ it was meant to be an example to simulate a demanding task

brisk mango
#

very bad example

wraith thicket
#

Temedy- It's an example to simulate an expensive task.

#

The PlayerMoveEvent isn't inherently "laggy". It's just that some people start doing things in there that can take more time then the server can afford. Since this event can run every tick for every online player, if you spend 1ms per player in here, 20 players would mean you're spending 40% of your tick in the event (which is not a good idea).

#

I.e I wouldn't recommend doing I/O in the event.

#

It is entirely correct to point out that this event has the potential to be a performance hog.

brisk mango
#

I mean you didn't even need to explain this, anyway everything in spigot is pretty shit tbh, and it makes sense you're not gonna run shit ton of code in there

wraith thicket
#

If it's shit, then what are you doing here?

brisk mango
#

It is shit bruh

#

the way everything in spigot works

tropic nacelle
#

Some people love to swim in it

wraith thicket
#

Then leave? I'm not sure why you'd be spending your time in a pile of shit.

brisk mango
#

this is just a discord

wraith thicket
#

OK; I stand corrected.

brisk mango
#

so it doesn't matter, does it?

#

i dont think.

jaunty night
#

Guys it's a troll move along

brisk mango
#

For example, have you seen the code of BukkitRunnable?

tropic nacelle
#

The spigot dev too

brisk mango
#

every method throwing 5 exceptions

wraith thicket
#

And what's your point?

brisk mango
#

you said that spigot is not shit

#

and so many minor bugs that haven't been fixed

wraith thicket
#

a) I never said that
b) Throwing exceptions is not inherently a sign of a bad codebase - you often want the user to know what went wrong

jaunty night
#

Guys it's a troll move along

wraith thicket
#

I'm bored - sue me 🙂

jaunty night
#

👨‍⚖️

brisk mango
#

It's wrong though in the case of BukkitRunnable and it can be sign of a bad codebase

tropic nacelle
#

Tru

wraith thicket
#

Is it wrong that your car breaks when you hit a brick wall?

brisk mango
#

would be