#help-archived

1 messages · Page 189 of 1

crimson sandal
dusky sigil
#

can i check if block != air?

crimson sandal
#

That method will return the highest non-empty block for given x and y

dusky sigil
#

but

#

than he would be able to spawn on a tree

#

which i dont want

livid spruce
#

Question, however, one can method as Boolean.parseBoolean(); in a Generic Class ? So I have a string and I want to make it a T. Casting wouldn't work in this context i think?

dusky sigil
#

if i check that block != air i can just generate again, rinse and repeat until i find a block that is air

pastel nacelle
#

yeah you asked that before, and it still doesn't make sense @livid spruce

#

what are you asking

vale moat
#

Is the webstie down? lol

#

website*

#

is backup nevermind

sharp mauve
#

Yep

#

Site is do-

#

that was fast

livid spruce
#

You can parse Strings to eg. booleans or Integers. And I'm asking for making this in a generic context
So eg. <T> is Boolean: In my method I want to convert a String from a database to this Generic type. In this case boolean

pastel nacelle
#

you need to know the type of T

#

which may or may not be possible in your case

sage bramble
#

just came here too see what was up with the site...

pastel nacelle
#

if you know it's a boolean, you just convert it to a boolean

sage bramble
#

guess that didnt take long for them to fix

livid spruce
#

But it also can be a Integer or a String

pastel nacelle
#

then test if it's an integer or a string

#

and convert accordingly

#

assuming you even can

livid spruce
#

Before sql I've done this with config. There I've got an object and casted it to <T>- Type

pastel nacelle
#

casting to T is unsafe if you don't know what you're doing

livid spruce
#

Why?

pastel nacelle
#

because generics kind of sucks with type safety during runtime

#

you won't know what T is most of the time, so your cast can't check if it's correct and can't throw a classcastexception

#

and then suddenly you will have a classcastexception in some random place in your code where you do get() and it expects a boolean and you get a fucking configurationsection or something

livid spruce
#

okay

pastel nacelle
#

the least pepega way of converting shit to T is

#

demand a input -> T converter either in the ctor or an abstract method

crimson sandal
#

java.lang.IllegalStateException: @NotNull method org/bukkit/Bukkit.getConsoleSender must not return null I've had this a few times now running CraftBukkit from source, I'm not sure what causes it 🤔

#

Weird, removing the NotNull annotation fixes it. // @NotNull public static ConsoleCommandSender getConsoleSender() { return server.getConsoleSender(); }

dusky sigil
#

GeneratedLoc.getBlock() will this output a block or a location?

crimson sandal
#

A Block, your IDE should be able to tell you that

dusky sigil
#

ok

crimson sandal
#

If you're using IntelliJ hover over the method and press Ctrl+Q

dusky sigil
#

GeneratedLoc.getBlock().equals("air")

livid spruce
#
        ResultSet resultSet = SQL_API.getResult("SELECT value from gg_settings WHERE user='" + player.getUniqueId().toString() + "' AND type='" + name + "'");
        try {
            while(resultSet.next()){
                resultSet.getBoolean("value");

            }
        } catch (SQLException throwables) {
            throwables.printStackTrace();
        }
        return false;
    }``` Why this always returns false?
dusky sigil
#

if (GeneratedLoc.getBlock().equals("air"))

#

^ will this check if the block is air?

livid spruce
#

This is the db entry

crimson sandal
#

No you want to check its Material and compare

#

Material.AIR

livid spruce
#

And the query is correct, I've checked it

pastel nacelle
#

a Block will never be equal to a String

dusky sigil
#

Unlikely argument type for equals(): Material seems to be unrelated to Block Main.java /Boss/src/me/ronsiv/Boss line 94 Java Problem

#

is that.. bad?

wraith thicket
#

You need to Block#getType to get the material

#

And compare those. You'd be better of comparing materials with == since they're enums

#

@livid spruce The only return statement you have there is the one that returns false...

livid spruce
#

OH lost

#

thx

dusky sigil
#

@wraith thicket i have a location. How would i make a if statement for that?

wraith thicket
#

If you want to check if the location refers to a block of air, then Location#getBlock, Block#getType and check the results with == Material.AIR

dusky sigil
#

so i need a variable?

wraith thicket
#

Not necessarily.

pastel nacelle
#

well

#

actually

wraith thicket
#

Like I said, you need to call the Location#getBlock and Block#getType methods

pastel nacelle
#

there are several kinds of air

#

you should call isAir instead

wraith thicket
#

Yes, you're right.

dusky sigil
#

wait

#

i need methods?

#

NOW im confused ok

#

so

wraith thicket
#

So Location#getBlock and Block#getType and Material#isAir

dusky sigil
#

location.isAir?

frigid ember
#

location.getBlock().getMaterial().isAir()

dusky sigil
#

why use hashtags when

#

theyre dots tho

frigid ember
#

i dont know why people use # lol

#

weirdos!

wraith thicket
#

It's how methods of a class are often represented

pastel nacelle
#

indicates an instance method

frigid ember
#

yes but they're confusing!

pastel nacelle
#

Block.method would indicate a static method

dusky sigil
#

The method getMaterial() is undefined for the type Block Main.java /Boss/src/me/ronsiv/Boss line 94 Java Problem

pastel nacelle
#

yeah what you're looking for is getType

wraith thicket
#

The point is, I'm talking about an instance method of a class, not invoking a method on an instance of said class.

frigid ember
#

i've been developing for 4 years and i don't think my team has ever actually used # lol

dusky sigil
#

How do i fix this problem?

odd knoll
#

yeah what you're looking for is getType

frigid ember
#

getType

dusky sigil
#

k

bold anchor
#

Cause # defines an instance all and . defines a classic call.

dusky sigil
#

if (GeneratedLoc.getBlock().getType() != Material.AIR)

#

this will check if its NOT air

#

correct?

bold anchor
#

Yeah, please follow naming conventions btw.

frigid ember
#

correcto

pastel nacelle
#

kind of

dusky sigil
#

thanks

wraith thicket
#

Sure, but you're not checking for other types of air

pastel nacelle
#

it checks if it's air specificly

#

but it won't check if it's cave air

dusky sigil
#

there are types of air?

pastel nacelle
#

or void air

wraith thicket
#

I.e CAVE_AIR or VOID_AIR

bold anchor
#

Dependso n version

pastel nacelle
#

i just said there are multiple types of air

bold anchor
#

he is probably using 1.8

frigid ember
#

wait since when are there two types lol

dusky sigil
#

im using 1,15

pastel nacelle
#

three

frigid ember
#

faceplam

dusky sigil
#

but why are there multiple types

pastel nacelle
#

for different kinds of air

frigid ember
#

1.15 is weird dw

wraith thicket
#

I think they were separated in 1.14?

dusky sigil
#

but why are there multiple types

pastel nacelle
#

so that you can tell the different kinds of air apart

frigid ember
#

probably to check if its void or cave lol

wraith thicket
#

The difference between regular air and void air is quite clear, I would say

dusky sigil
#

i mean void air hurts

pastel nacelle
#

not necessarily

frigid ember
#

1.12 and up is a joke lol

dusky sigil
#

.....

pastel nacelle
#

being under -64 hurts

#

void air itself doesn't hurt

wraith thicket
#

Void air is also above the build height

frigid ember
#

what do you consider build height?

pastel nacelle
#

the max world height

wraith thicket
#

255 is the last block you can build

pastel nacelle
#

anything below 0 and above 255 will be void air

frigid ember
#

but what if i changed the minecraft protocol

pastel nacelle
#

what

frigid ember
#

wdym what

pastel nacelle
#

you have no idea what you're talking about, do you

grim halo
#

How dou want to change the mc protocol?

frigid ember
#

recompile minecraft for heavens sake

wraith thicket
#

If you rewrote MC, you can do whatever you like.

pastel nacelle
#

yeah and that is going to help with the client not being able to render blocks above 255 how

#

are you going to recompile your players clients as well

frigid ember
#

of course!

#

ever heard of something called a client good sir?

#

in this situation we would make a launcher

wraith thicket
#

No, that's why he used the word ...

frigid ember
#

to launch our custom version

grim halo
#

Then why are you here and not in the forge discord?

quick arch
#

sounds like it's going to be 1.8.8

frigid ember
#

because this is fun!

#

why wouldn't it be 1.8.8?

pastel nacelle
#

that isn't "changing the protocol"

#

that is creating a mod

frigid ember
#

this is fun

#

you have no idea how much im laughing in real life

wraith thicket
#

Way too many 1.8.8 devs seem to want to "fork Spigot" for no good reason and have no idea what they're doing and come here to ask

frigid ember
#

i'm not forking a spigot lol

#

anyway besides the point lol how is everyone

bold anchor
#

Hah, that's what you get for supporting versions below 1.15 and 1.16

grim halo
#

Way too many 1.8.8 devs want to use 1.8.8...

wraith thicket
#

I'm not saying you are. I'm just saying that's probably why 1.8.8 was suggested

frigid ember
#

1.8.8 is the best for running a server (unless you want all the new blocks n stuff)

pastel nacelle
#

imagine supporting 1.8

frigid ember
#

imagine using 1.12+ what

grim halo
#

Yes... better use 5year old versions...

frigid ember
#

i'm not sure if I know what i'm talking about, but running a pvp server on 1.16 isn't the best way to go

pastel nacelle
#

imagine being half a decade out of date

quick arch
#

There's already over 90,000 servers that are using 1.12.2+

frigid ember
#

damn 90,000 my heart n soul

frigid ember
#

right not sure what i got from that link

craggy lynx
#

Ist there a way to tag players something like this:
player.addTag("Tag")
And
if (player.hasTag("Tag") {}

frigid ember
#

what

grim halo
#

Yes kind of

wraith thicket
#

Use the persistent data containers @craggy lynx

grim halo
#

Use the ScoreboardTags

frigid ember
#

use metadata!

grim halo
#

Or that. But ScoreboardTags upport more versions and is a bit faster if you just want to tag a player

pastel nacelle
#

if you don't require persistence just use a uuid -> set<tag> map

grim halo
#

And dont ever use metadata

craggy lynx
#

Thanks

frigid ember
#

why not metadata?

#

whats wrong with it?

grim halo
#

not persistent

pastel nacelle
#

becuase it's an abandoned aborted fetus of what later became the pdc

frigid ember
#

jesus christ

#

maybe i should switch to 1.16

bold anchor
#

Yes

wraith thicket
#

I hear some people still enjoy Windows 8 as well

frigid ember
#

now whats wrong with windows 8 exactly?

quick arch
#

uh... I'm on windows 8 only because Discord's Application kept giving me a bsod upon startup launch on Windows 10

#

kek

frigid ember
#

reinstall discord

wraith thicket
#

I don't know, I don't really use Windows

quick arch
#

Reinstalled it twice, still happened

wraith thicket
#

But from what I understand, the general concensus us that Win10 > Win8

quick arch
#

Eventually had to go to Windows 8

grim halo
#

Id rather use windows XP than 8 to be honest...

pastel nacelle
#

8 is "fine"

bold anchor
#

Win10 is the more windows 7 like windows 8

wraith thicket
#

Hmm, Vista or ME? 😄

pastel nacelle
#

there is little practical difference between 8.1 and 10 to be honest

quick arch
#

Windows 9

wraith thicket
#

Isn't 10 really more like 8.2 or something?

pastel nacelle
#

it is, or at least was, 8.1 but with a different start menu

wraith thicket
#

But I think what most people didn't like about 8 was the "tablet-like" interface that they brought up

pastel nacelle
#

yeah, that is a nonfactor for me since I use a different shell anyway

#

so 2 me they are basically identical except for some small under the hood differences

wraith thicket
#

Well, most people (I don't really have statistics for this, I'm just guessing) will run their OS pretty much as is

#

(and then download something weird and have it crash)

pastel nacelle
#

most people are plebians, yeah

normal flume
#

unfortunately i can't contact the developer for support, so i guess this is my last shot: i tried installing the expansion luckperms api for placeholder api, but it won't work and every time i try to restart the server, i get this: https://pastebin.com/g2qcCsd5

quick arch
#

1.8.8, yeah you won't get support here

normal flume
#

k

rare prairie
#

unfortunately i can't contact the developer for support, so i guess this is my last shot: i tried installing the expansion luckperms api for placeholder api, but it won't work and every time i try to restart the server, i get this: https://pastebin.com/g2qcCsd5
Why you not wait for the response of the developer? Or just make an issue on github

frigid ember
#
    public void onBlockDrop(BlockDropItemEvent event){
        Block block = event.getBlock();
        //block.getType() is Material.AIR
    }

Anyone knows how to get the block which was about to be dropped?

quick arch
grim halo
#

Like you did. Thats the block you get the drop from.

quick arch
#

Seems like he wants the drops or something

grim halo
#

Ah ok.

paper compass
#

Anyone here have a good intellij theme?

grim halo
#

Then like you wrote

quick arch
#

English is weird

frigid ember
#

I break the block but the block is AIR when I break it instead of the actual block

#

@grim halo that doesn't work, it shows that the material is air.

grim halo
#

So you dont want to get the drops but the block type that was broken?

dusky sigil
#

my localhost server is not handling this, is there any way i can allocate more RAM for it?

grim halo
#

Yes. Java parameter for this is -Xmx

#

@frigid ember ?

dusky sigil
#

so i tried changing my start bat to 2

#

Error occurred during initialization of VM
Could not reserve enough space for 2097152KB object heap

grim halo
#

to 2G?

dusky sigil
#

yup

grim halo
#

How much ram do you have in your pc?

frigid ember
#

@grim halo the .getBlock returns air instead of the actual block which was broken

dusky sigil
#

@grim halo should be 12

pastel nacelle
#

@grim halo ping

wheat mirage
#

Hey, can I use the new RGB chat colours with the bungee motd without it breaking on older versions?

grim halo
#

@frigid ember Yes you need to get the BlockState. event.getBlockState().getType()

frigid ember
#

@grim halo got any idea?

#

ohhh thank you

dusky sigil
#

actually its 16 GB

frigid ember
#

it worked!

#

Thank you so much @grim halo

dusky sigil
#

lets ping @grim halo

#

oh yeah, this is fun

grim halo
#

@dusky sigil do you have 64 bit java installed?

paper compass
#

@grim halo

dusky sigil
#

@grim halo i think so

#

how can i check?

grim halo
#

go to your terminal and type java -version

dusky sigil
#

java version "1.8.0_251"
Java(TM) SE Runtime Environment (build 1.8.0_251-b08)
Java HotSpot(TM) Client VM (build 25.251-b08, mixed mode, sharing)

grim halo
#

What do your start parameter look like?

dusky sigil
#

my start.bat?

#
@echo off
java -Xms2G -XX:+UseConcMarkSweepGC -jar spigot-1.15.2.jar
pause```
grim halo
#

Yes. Only the java line

dusky sigil
#

well

#

theres only 2 other lines

#

it was 1 before i changed it

grim halo
#

-Xmx2G

dusky sigil
#

it WAS 1

#

and it worked fine

grim halo
#

add -Xmx2G

dusky sigil
#

instead of the other one?

grim halo
#

after your initial ram pool size

dusky sigil
#

ok

tacit trellis
#

Is there a way to get the entity type with the entity id?

grim halo
#

You can get the entity instance by id and then check the type.

dusky sigil
#

@grim halo

#

doesnt fix it

#

Error occurred during initialization of VM
Could not reserve enough space for 2097152KB object heap
Press any key to continue . . .

quick arch
#

Probably has 32 bit

pastel nacelle
#

the output of java -v doesn't mention it being 64bit so it's 32 bit

dusky sigil
#

my computer is a 64

grim halo
#

there was something like fullversion

pastel nacelle
#

your java isn't

#

java =/= computer

dusky sigil
#

well ok than

#

is it like

#

a process to replace it now?

grim halo
#

try java -fullversion

quick arch
#

fullversion displays less info

grim halo
#

Yes uninstall the old one and download the new one

dusky sigil
#

thats it?

#

wiat

#

wait

pastel nacelle
#

get 14 while you're at it 🙃

dusky sigil
#

how can i uninstall?

quick arch
#

Just get openjdk

grim halo
#

Like... how you would uninstall anything else on your pc

dusky sigil
#

okay

#

it sounds like a process

quick arch
#

Java has their own version uninstaller

dusky sigil
#

my java seems to be 64 bit

#

TERMINATING the wrong java version fixed it

#

so i activate my plugin, it seems to work but the entity does not move, the player cant execute commands and after a few secends the player gets kicked

wraith solar
#

Hey, did something change in how spigot handles world initialization on server startup in 1.16?

dusky sigil
#

i imagine thats preformence but i cranked that to 7 gigs

wraith solar
#

I've just spent the last 90 minutes trying to debug why all of my minigame plugins suddenly failed to load after they have been working great for months

#

after investigation it's because the plugin is loading and trying to load its save data before the rest of the worlds load

pastel nacelle
#

protip: key data by world and listen to world (un)load events

wraith solar
#

that would dramatically overcomplicate a simple load function

dusky sigil
#

any ways to fix this?

#

i mean im only running worldedit and this one

#

also it seems as the whole server crashes

fickle hamlet
#

ok so i'm trying to setup a spigot server to play on

#

and i want to be able to use my account multiple times on the same server

#

so i wanted to setup my own server as the host i was using before wouldn't allow me to change the server files in order to prevent username checking

#

however now i can't get buildtools to install

#

i run it and it says i don't have enough ram

#

and i don't know how to add the xmx or xms flags to make it run with more ram

#

the closest i got was when i typed in a command to run it with more ram, but it failed to "access jarfile BuildTools.jar"

pastel nacelle
#

probably need to modify the default flags used by java on your user

#

i don't know shit bout buildtools though so idk

fickle hamlet
#

ok so is there some java config tool

#

on my pc

wraith solar
#

you using a bat file to start the server or just double-clicking the spigot file?

fickle hamlet
#

i don't have the server files

#

i need to run buildtools

#

at least i think

#

i don't know

wraith solar
#

ah ok

#

how far have you gotten in doing that?

#

build tools in a folder, trying to run via commandline?

fickle hamlet
#

i just have the buildtools installer

#

i don't know what command to use, the only one that even got close to working failed anyways

wraith solar
#

from commandline the command should be

#

java -jar BuildTools.jar --rev 1.16.1

fickle hamlet
#

Error: Unable to access jarfile BuildTools.jar

#

i ran it as administrator too

wraith solar
#

k, so you have windows commandline open

#

or are you using bash?

fickle hamlet
#

i have command prompt

wraith solar
#

k, and are you currently navigated to the same folder you have the BuildTools.jar file in?

fickle hamlet
#

how do i open a file in cmd prompt

coarse island
#

BuildTools.jar is no installer, but a compiler, compiling a spigot*.jar file (the server);
You run the spigot*.jar file to start a server

Or am I missing something?

wraith solar
#

where do you have the BuildTools.jar?

fickle hamlet
#

uhhh idk

#

desktop

#

i was just following what it said on the page i was reading

wraith solar
#

are you familiar with fileExplorer at all?

fickle hamlet
#

i know file explorer

wraith solar
#

the windows file manager

fickle hamlet
#

yeah

wraith solar
#

k so open that up and go to your c drive

#

create a new folder and call it Spigot

#

and put the BuildTools.jar in that folder

fickle hamlet
#

ok

#

how do i open the spigot folder in command prompt

wraith solar
#

we'll get to that

#

just put the BuildTools.jar in the folder first

umbral dirge
#

I wanna start selling plugins but i live in germany. We need an "Gewerbe" for selling things, do i need that for spigotmc?

sturdy oar
#

I don't think so

#

unless germany is really weird

pastel nacelle
#

who cares about legislation

umbral dirge
#

it is

#

I do

pastel nacelle
#

pussy

sturdy oar
#

In many countries you'd have to start doing legal stuff after you make like thousands of income

fickle hamlet
#

yeah i don't think i have the spigot file

#

also it's in the folder

wraith solar
#

k

#

so there's two ways that I know of to run it

#

either directly from commandline or using a .bat file

umbral dirge
#

I need an clear answer

wraith solar
#

using the .bat would probably be easier

#

do you have file extensions enabled in your fileExplorer?

#

so when you see a files it's like "name.txt" not just "name"

pastel nacelle
#

imagine using the built in file explorer

wraith solar
#

working with what we got here 😛

#

normally I use bash but he doesn't have that installed

fickle hamlet
#

ok i just turned it on

#

i don't know how to turn the text file into a bat file

wraith solar
#

k, inside the same folder as buildtools create a "runSpigot.txt" file

#

but we actually want it to be runSpigot.bat (you will need to rename it)

#

could also name it runBuildTools.bat if that's easier

#

name doesn't actually matter

#

mine looks like this for starting a spigot server (this is for after you have the spigot jar which you dont yet)

fickle hamlet
#

ok i ran it with the command for downloading spigot

#

Error: Unable to access jarfile spigot.jar

#

oh

#

ok

wraith solar
#

yeah inside the .bat file that you created

#

right-click it and click edit

fickle hamlet
#

yeah i did that

#

it's a bat file now

wraith solar
#

then make the file be java -jar BuildTools.jar --rev 1.16.1

#

save that and you should be able to double click it to run that command from within the same context as the folder you placed the file in

#

and the picture I sent has an example of how you can use -Xmx too if you need to set a ram limit

fickle hamlet
#

ok

#

so i put this command into the file

#

java -jar -Xmx2048M BuildTools.jar --rev 1.16.1

wraith solar
dusky sigil
#

did he do cd?

#

cd file directory?

fickle hamlet
#

i ran it, command prompt popped up for a fraction of a second and then vanished

wraith solar
#

am not bothering to try and teach him commandline navigation

carmine eagle
wraith solar
#

the .bat file will do that for him

fickle hamlet
#

and it doesn't seem like anything happened

willow juniper
#

heh how do i change the spigot website style

#

hey*

wraith solar
#

are the contents of the .bat file the same ones I showed?

willow juniper
#

i only saw one style

fickle hamlet
#

yeah with the -xmx flag

#

java -jar -Xmx2048M BuildTools.jar --rev 1.16.1

dusky sigil
#

anyone has any idea about my situation?

#

so i activate my plugin, it seems to work but the entity does not move, the player cant execute commands and after a few secends the player gets kicked any ways to fix this?
i mean im only running worldedit and this one
also it seems as the whole server crashes

#

i made the server 7 gigs

grim halo
#

Looks like the server freezes in a while loop...

willow juniper
#

how do i change the spigot website style i only saw one and i can't find the rank donation page for spigot

dusky sigil
#

@grim halo i checked the code

#

but i mean

#

heres the whole thing

#

its not that long

grim halo
#

Ill take a look at it in a min

dusky sigil
#

also suprise suprise i kindly snatched your particle code (:

fickle hamlet
#

ok i think i might have found the problem

#

for some reason i had the file "buildtoolsgui.exe"

#

so the link from the website was wrong

#

is this right?

dusky sigil
#

YES

#

THIS IS GOOD

grim halo
#

TimeUnit.SECONDS.sleep(6); This freezes the server for 6 seconds.

dusky sigil
#

wait

#

does that freeze the WHOLE THING?

#

ok i gotta think again about downloading plugins bruh

#

how do i make my plugin sleep alone?

#

i just want to have delay

fickle hamlet
#

i just thought of wheatley saying bruh

#

and it scared me to my core

dusky sigil
#

ahaha

#

you guys get it its because wheatley is a coree hahaha

fickle hamlet
#

invoked the most palpable, eviscerating, pure terror

fickle hamlet
#

also that was unintentional but ok

grim halo
#

Everything runs on one thread. If you block the thread then the next tick wont start

dusky sigil
#

@grim halo i dont understand this chart, and i have a feeling that thats what you wanted me to say

grim halo
#

Every tick lasts 50ms

dusky sigil
#

well

#

depends what tick

#

command block ticks are 20 ticks for a secend

grim halo
#

You get 20 TPS
TPS = ticks per second.
So the server starts a new tick every 50ms

dusky sigil
#

point is, how can i do this?

#

point is, how can i do this?

grim halo
#

How can you do what?

dusky sigil
#

how can i freeze the plugin only

fickle hamlet
#

ok so now what

#

i have buildtools i think

wraith solar
#

@fickle hamlet sorry, work phone rang. did you get it to work?

fickle hamlet
#

i redownloaded. file that i had was wrong

grim halo
#

You cant freeze the plugin at all. The plugin runs on the main thread.
You can however schedule something for later ticks.

dusky sigil
#

@fickle hamlet continue watching the video i sent you

wraith solar
#

oh you got him a video? great!

#

so I also have a question but it might be something that only md5 himself can answer

dusky sigil
#

@wraith solar unrelated, i thought your pfp was patrick for this whole time

wraith solar
#

did something change in how spigot initializes worlds/plugins in the 1.16 update?

dusky sigil
#

anyways gamers i gotta go

#

ill figure out this sleep thing tommrow

#

no pun intended

fickle hamlet
#

uhhh

#

the video shows that he had a bunch of other files

#

i only have 3

wraith solar
#

you will only have 3

#

the other files are created by buildtools.jar

#

that's what you will have after it runs

grim halo
#
    Bukkit.getScheduler().runTaskLater(this, new Runnable() {

      @Override
      public void run() {
        System.out.println("This will be run after 20 ticks.");
      }

    }, 20L);

Thats how you schedule something for later ticks. For this case 20.

dusky sigil
#

oh damn

#

runnables agai

#

again

wraith solar
#

you know you can do that with a lamba, right?

grim halo
#

Yes

dusky sigil
#

i hate runnables

#

agsrtuj

grim halo
#

but i want him to understand what is happening

wraith solar
#

runnables are nothing XD

dusky sigil
#

so i dont understand anything

#

how can you store a method

#

in a command

#

its like doing

wraith solar
#

here 1 sec I'll setup an example class

dusky sigil
#
void {
}
}```
#

its heresy

#

its witchcraft

#

its syntax

#

but yeah i gotta go

wraith solar
grim halo
#
    Bukkit.getScheduler().runTaskLater(this, () -> System.out.println("This is also run after 20 ticks"), 20L);

Thats the lambda aproach

dusky sigil
#

why, why is there a arrow in there

#

WHY

wraith solar
#

it's called a lamda

#

a Runnable by definition is an interface with one method: run()

fickle hamlet
#

ok

#

so the command finished

wraith solar
#

as of Java 8, these are now known as "Functional Interfaces" and you can use lamda to provide the method as a shorthand

grim halo
#

He does not know what an interface is. Thats just confusing him

fickle hamlet
#

but i have bukkit and not spigot

dusky sigil
#

WHY IS THERE A ARROW

#

what - who defines this

#

okay nevermind

wraith solar
#

the Java specification XD

dusky sigil
#

i wont be able to sleep like this guys

wraith solar
#

here let me give you a format you can use that might make sense

dusky sigil
#

oh no

#

this is the last thing

wraith solar
dusky sigil
#

guess what

fickle hamlet
#

why did the command download bukkit

wraith solar
#

()-> {} is just the lamba format

#

but you can think of it like an internal method for now

#

whenever you need to use a runnable

dusky sigil
#

ok ok

#

tommrow

pastel nacelle
#

lambda's are the tool of the devil

wraith solar
#

you can ust that format instead and specify the code you want the runnable to run

#

lamdas are awesome and I use them everywhere

dusky sigil
#

bye

pastel nacelle
#

if you want your timings to be readable, never use timings for sync bukkit tasks

wraith solar
#

later ronsiv!

pastel nacelle
#

like i guess if you only use it on startup, it's fine

wraith solar
#

well what I actually do is I use a method reference from syncRepeatingTasks

pastel nacelle
#

but if you put anything that runs more than once during a server session, you definitely want to give a task that has a name

wraith solar
#

I have tick() methods in any class that does somethign every tick

pastel nacelle
#

because if your plugin shows up on my timings as 50 cases of $$lambda$1415134234

#

i will find you

#

and shove my boot so far up your ass

wraith solar
#

lol

#

I should double check if my timings show up like that . . .

#

they might >_>

fickle hamlet
#

can i use spigot addons in bukkit

wraith solar
#

the command you ran should have built a spigot jar

pastel nacelle
#

i have made the habit of using local classes for all of my sync tasks

fickle hamlet
#

no it made bukkit

pastel nacelle
#

it's only like 3 extra lines of code

wraith solar
#

is the command still executing?

#

it should take several minutes

pastel nacelle
#

and will save the day of someone looking at their timings

fickle hamlet
#

no it finished

#

it gave me another command line

wraith solar
#

can you snip tool the folder?

#

you don't have to save the picture just click new, and then ctrl-v it into discord and it will work

#

auto saves to clipboard for some reason

#

the problem with my tick methods is that they are usually at the top of some large hierarchy

#

but yeah if all it takes is making a private class ProjectileTick implements Runnable {
run () { tick()}
}

#

maybe I should do that

fickle hamlet
#

uh it's not pasting

#

there's also no plus button to send pictures

#

lemme dm

unkempt ridge
#

so I just made a plugin in 1.16.1 Bungee, how would I make it so it also support versions 1.8-1.15?

light geyser
#

Hi, Im having some struggles with Gradle,
Ive got the following task: ```groovy
task releaseJar(type: ShadowJar) {
description 'Build a release jar'

classifier 'RELEASE'

destinationDir = file("$rootDir/releases")

}

releaseJar.dependsOn(shadowJar)```

#

It creates the jar, however it only contains the META-INF directory, nothing else

#

If I run gradle shadowJar I do get the everything

wraith solar
#

I think your missing the sources spec

#

thoug my gradle skills are a little limited

light geyser
#

Could you explain? im not too good with gradle just yet 😄

wraith solar
#

yeah I'm not overly great either unfortunately 😦 I can send you what I've been using to build my plugins at least

#

but not tried to shade in dependencies yet

torn robin
#

yo guys

#

I have this feature basically /reportbug

#

and it sends a webhook message to my discord server with debug stuff

wraith solar
#

jar {
from { fileTree('lib').collect { zipTree(it) } }
}

#

this part might be the bit you are msising

torn robin
#

how can i hide the link (to the webhook) in the plugin to avoid it being accessible to others

light geyser
#

That would be for dependcies no, Cryptic?

#

im not even getting my own code compiled, lol

wraith solar
#

this is my base build.gradle that I use to start all my plugins:

#

group 'com.gamedacademy.soundsample'
version '1.0'

apply plugin: 'java'

sourceCompatibility = 1.8

repositories {
mavenLocal()
mavenCentral()
maven {
url 'https://hub.spigotmc.org/nexus/content/repositories/snapshots/'
}
}

dependencies {
compile group: 'org.spigotmc', name:'spigot-api', version:'1.15-R0.1-SNAPSHOT'
}

javadoc {
options.encoding = 'UTF-8'
options.charSet = 'UTF-8'
options.links(
'http://docs.oracle.com/javase/7/docs/api/'
)
}

task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}

jar {
from { fileTree('lib').collect { zipTree(it) } }
}

artifacts {
archives javadocJar
}

light geyser
#

Not exactly what I want unfortunately 😦 All works but the custom tasks

#

I was hoping dependsOn(shadowJar) would solve it, but nope, lol

wraith solar
#

yeah you're trying to have it shade in the dependencies as part of the jar package, right?

light geyser
#

yeah, and the code itself

#

the jar I get from releaseJar doesnt contain a single class file, only the Manifest

wraith solar
#

I vaguely remember trying to do that a few months ago but I don't think I ever got it to work 😦

#

if my memory is correct, It had something to do with a custom configuration so that in your depencies section in the same way you put "compile: ----", you could also specify something like "shade: ----"

#

but I can't seem to find the project I was using to test it out

#

it might have been this, but this was for maven stuff

#

configurations {
deployerJar
}

repositories {
mavenLocal()
mavenCentral()
maven {
url "https://raw.github.com/synergian/wagon-git/releases"
}
}

dependencies {
testCompile 'junit:junit:4.+'
deployerJar "ar.com.synergian:wagon-git:0.2.5"
implementation 'com.intellij:annotations:12.0'
}

#

artifacts {
archives javadocJar
}

fickle hamlet
#

aight so my thing finished

#

@echo off
java -Xms1G -Xmx1G -XX:+UseConcMarkSweepGC -jar spigot.jar nogui
pause

#

is that the next step?

#

i have the spigot.jar file

#

@wraith solar

dim summit
#

Evening lads, having a little issue where the server keeps crashing, although the logs aren't saying anything.

#

And there doesn't seem to be a crash reports folder.

wraith solar
#

crashing or freezing

#

when I've had crashes with no logs it's often a server freeze and then it crashes like a minute later

#

my server then dumps all it's current info, but doesn't give an actual reason for the crash

#

can be due to a plugin stalling the main thread, but when it isn't due to a plugin I've often found that the cause was a corrupt world chunk

dim summit
#

I'll take a look, cheers

carmine eagle
#

I have a custom scoreboard with a placeholder expansion for 'PlayerPoints' but it only has %playerpoints_points% which shows how much points you have.

Is there anyway to show other players points on the scoreboard?

undone narwhal
#

Now... in english?

#

@carmine eagle one way, only if you code it yourself

fossil thorn
#

how do I set it at Intellij that when I create a new class that it says something like:```package de.yaquza.tabboard;
import org.bukkit.plugin.java.JavaPlugin;

/*
*

  • A Class created
  • by yaquza

*/

public final class Main extends JavaPlugin {

@Override
public void onEnable() {
    // Plugin startup logic

}

@Override
public void onDisable() {
    // Plugin shutdown logic
}

}

undone narwhal
#

You mean the copyrights? Or the whole generated class?

fossil thorn
#

the copyright

undone narwhal
mellow wave
#

/give @p diamond_pickaxe{Unbreakable:1b}

pastel nacelle
#

it's not an enchant

mellow wave
#

It isn't

#

It's just a tag

pastel nacelle
#

anything with durability

mellow wave
#

^^

pastel nacelle
#

not sure about carrot on a stick

subtle blade
#

Same applies

buoyant path
#

anyone use morphia that could help me?

#

or have used morphia

undone narwhal
#

gamerule

#

/gamerule showDeathMessages false

pastel arrow
#

IDK if its a 1.16 issue but my strings or getting saved like ยง6Test in the yamls instead of &6Test when I get the string from an items name... itemMeta.getDisplayName().toString();

buoyant path
#

why would you do .toString on getDisplayName lol

#

getDisplayName is a string

undone narwhal
#

How do you get the string for the config?

#

And what's the encodding of your file?

buoyant path
#

config.getString("path")

pastel arrow
#

why would you do .toString on getDisplayName lol
getDisplayName is a string
Was testing all different ways. ended on .toString()

subtle blade
#

😛

pastel arrow
#

Was testing all different ways. ended on .toString()

undone narwhal
#

And what's the encodding of your file?

#

/save-all

#

x)

pastel arrow
#

And what's the encodding of your file?
No clue? Should be default

pastel nacelle
#

"default" is not an encoding

pastel arrow
#

Haven't change "the files encoding" so gonna say default

undone narwhal
#

I don't understand

pastel nacelle
#

that doesn't answer the question, though

pastel arrow
#

Neither do i lol

undone narwhal
#

Yapperyapps try to File > Save-As and choose UTF-8

buoyant path
#

@pastel arrow lol it wont change anything but alright

#

show me where you set the string in the config

#

and how you are retrieving it

#

if applicable

undone narwhal
#

hate? Do you mean punch/damage ?

sinful spire
#

hit*

undone narwhal
#

Do you have any plugins installed on your server?

#

Is there anything related to weapons or something like this?

pastel arrow
#

Yapperyapps try to File > Save-As and choose UTF-8
Not seeing that in the drop down.

Side note: Only happens on 1.16

show me where you set the string in the config

ItemStack item = event.getInteractionItem();
ItemMeta itemMeta = item.getItemMeta();

getConfig.set(key, "Name:"+itemMeta.getDisplayName().toString());
saveConfig();
buoyant path
#

maybe try ChatColor.stripColor(itemMeta.getDisplayName())

undone narwhal
#

Just share a screen of your /plugins

pastel arrow
#

maybe try ChatColor.stripColor(itemMeta.getDisplayName())
Then I can't get the color codes from the config data

buoyant path
#

also getConfig?

#

it should be getConfig() should it not?

undone narwhal
#

Not placeholderapi

pastel nacelle
#

translate color codes to & when serializing and to § when deserializing

sinful spire
#

just /pl

buoyant path
#

also ChatColor.stripColor() sends it to &

pastel arrow
#

also getConfig?
Written out wrong

pastel nacelle
#

& is the standard for when the end user has their hands on the colorcodes

undone narwhal
#

§ won't go in the config I guess

buoyant path
#

thats probably what his thing was earlier

pastel nacelle
#

it will if it has the right encoding

buoyant path
#

ยง6Test

#

is what he said

pastel nacelle
#

but the point is that you shouldn't do it in the first place

tiny horizon
#

do you need to have Spigot in order to use Skungee or can you use PaperSpigot aswell

pastel nacelle
#

because at the end of the day the config is for the end user

sinful spire
#

just /pl screenshot it and post here

undone narwhal
#

+1

pastel arrow
#

also ChatColor.stripColor() sends it to &
No ChatColor.stripColor() will remove all color codes from the string.

sinful spire
#

do it in console then

buoyant path
#

it is the reverse of .translateAlternateColorCodes

#

lol

#

trust me it works

#

and if not

pastel nacelle
#

i don't think that is the case

buoyant path
#

you could just do

pastel arrow
#

Name:Test

buoyant path
#

.replace("actualColorCode", "&")

tiny horizon
#

do you need to have Spigot in order to use Skungee or can you use PaperSpigot aswell?

wraith solar
#

stripColor does not put the &codes back into the string

#

it just strips the color tags out entirely

undone narwhal
#

^ replace method do it

pastel arrow
#

Testing one sec

wraith solar
#

does spigot provide any way to get a player's chat message in ChatComponent format rather than String format?

sinful spire
#

placeholder api doesnt change anything in the /pl and /plugins commands

#

you might have a plugin that blocks both of them

undone narwhal
#

Why do you wanna hide plugins?

sinful spire
#

^ do it in console then

#

-.-

#

go into the server folder

#

into 📁 plugins

pastel nacelle
#

if you can't list your plugins, you probably shouldn't be running a server

pastel arrow
#

.replace("actualColorCode", "&")
Worked. Kinda annoying that I have to do that now though.

sinful spire
#

and send a screenshot

chrome lark
#

kicks them with what message?

sinful spire
#

thats a bungeecord message

chrome lark
#

check the proxy logs

sinful spire
#

you have so much plugins, it doesnt display them on the chat?

undone narwhal
#

@wraith solar What's the String you get when a ChatComponent is sent? (such as with a clickable link)

wraith solar
#

I'm not asking how to send a chatcomponent, rather how to intercept one

chrome lark
#

in the bungee logs folder

wraith solar
#

was thinking of writing a plugin to enable RGB colors in player chat

chrome lark
#

or the console for bungee

sinful spire
#

do you run bungeecord/waterfall/something else as a proxy?

#

lets be honest, he's trolling probably

torn robin
#

are there no help discords in a language you speak natively

sinful spire
#

btw, what language you speak natively?

pastel nacelle
#

probably want to learn english at some point so all of the goyim can understand you

undone narwhal
#
  1. Answered until one of your plugins (you don't want to send us the list) change it
#
  1. Not understood
#

Oh god

sinful spire
#

just go into the server's folder

#

and into plugins

pastel nacelle
#

use /minecraft:give instead of /give

sinful spire
#

yes please do that

torn robin
#

wait

#

are these two separate issues

#

it sounds like you're presenting them as one

undone narwhal
#

Do you guys maybe know a plugin that block the /pl and when someone do it then the server crash the player? LMAO

pastel nacelle
#

/minecraft:give @s diamond_pickaxe{Unbreakable:1b}

sturdy oar
#

No Its against Spigot rules

undone narwhal
#

Yes of course

#

but

torn robin
#

ive gotten kicked for it

#

have yet to see a ban/crash

sinful spire
#

wait hiding /pl is againts spigot rules? lol

undone narwhal
#

seems like his server wanna defend its plugins list

pastel nacelle
#

he probably has essentials and the egive command doesn't support nbt

torn robin
#

crashing the player is

undone narwhal
#

No worries MSWS, crashing players in backdoors is cool

sinful spire
#

dont think that minehut supports /pl

wraith solar
#

I had a plugin that could cause player's clients to crash outright

#

ofcourse it wasn't supposed to do this

#

but it was fun to debug >_>

torn robin
#

just deoop everyone ezpz

undone narwhal
#

Just create a SSH root access ezpz

pastel nacelle
#

good

#

you shouldn't /reload, either

torn robin
#

god damn

#

is this mans

pastel nacelle
#

reload bad

torn robin
#

really using protocolsupport still

sinful spire
#

Rolyn, just backdoor them with skript-mirror 😄

undone narwhal
#

x)))

sinful spire
#

its one of those miningpvp servers

undone narwhal
#

What's minehut? Is it a pooped fork of spigot to run free servers?

chrome lark
#

I asked for you to provide the error from the bungee logs

#

You're still not provided it

#

am not sure what you're expecting if you can't provide basic info

torn robin
#

/give @p diamond_pickaxe{Unbreakable:1} 1

sleek ivy
#

so new HoverEvent is deprecated now? what should I be using

torn robin
#

look at the javadocs

#

that's

#

not

#

what

#

i

#

sent

sleek ivy
torn robin
sinful spire
#

minecraft:give

pastel nacelle
#

we're still doing this?

torn robin
#

gee

#

if only we had suggested that earlier

pastel nacelle
#

first suggested like 25 minutes ago 👶🏿

torn robin
#
NNYaKNpGms0eUVpiSdHxToday at 3:10 PM
/minecraft:give @s diamond_pickaxe{Unbreakable:1b}

he probably has essentials and the egive command doesn't support nbt
#

what a shame we didn't suggest it earlier

#

@pastel nacelle should've thought of it earlier ig ¯_(ツ)_/¯

sleek ivy
#

what string formats does ChatColor.of support? just hex? or the &x&f&f&f... format too? the javadocs don't say

frigid ember
#

is it possible to make breaking specific block take exactly some amount of time?

#

in client side so it would show breaking animation correctly

torn robin
#

I believe just &x&f...

wraith solar
#

as of 1.16 ChatColor.of supports hex codes

crimson sandal
frigid ember
#

so you wrote some code and it kicks you? send any errors from console

torn robin
#

the fuck

#

can you use spigot?

frigid ember
#

or paper

torn robin
#

>:(

crimson sandal
#

It's for a CraftBukkit PR

#

@subtle blade have you ever seen that error before when running CraftBukkit?

torn robin
#

does craftbukkit not have its own discord

frigid ember
#

I wouldn't be surprised if they don't

crimson sandal
#

Spigot maintains CraftBukkit 😛

subtle blade
#

You're looking at it

torn robin
#

wow

#

disappointed

#

whats the diff between bukkit and craftbukkit even

frigid ember
#

craftbukkit is a fork

subtle blade
#

No

crimson sandal
#

Bukkit is the API. CraftBukkit is the server implementation of it

subtle blade
#

Bukkit is API, CraftBukkit is implementation/server

frigid ember
#

isn't it? O_O

#

oh

torn robin
#

so devs compile using bukkit

#

servers run using craftbukkit

#

?

subtle blade
#

They're part of the same project, much like how Spigot is composed of Spigot API and Spigot-Server

#

Correct

torn robin
#

coolio

subtle blade
#

You should be able to interact with the API without any interaction with CraftBukkit. That was Bukkit's goal

torn robin
#

NMS tho 💦

subtle blade
#

CB should be practically invisible

crimson sandal
#

I'm making a PR for Recipe Book inventories to listen to the click event

#

This crash is confusing me though since it's something I haven't even touched lul

#

I have to keep restarting IntelliJ and mvn clean install and it'll randomly start working again... strange

frigid ember
#

I want to set up vim for programming with java

untold sky
#

what command adds the next line to the item name? I mean the script

sleek ivy
#

Why do vanilla color codes work in existing string passed to a component builder but custom colors fail? Works: player.spigot.sendMessage(new ComponentBuilder(ChatColor.RED + "test").create()); Fails: player.spigot.sendMessage(new ComponentBuilder(ChatColor.of("#7375ff") + "test").create());? When I use player.sendMessage(ChatColor.of("#7375ff") + "test") it works fine

tranquil portal
#

God I have

#

SO many questions

#

I'm on MacOS and I created a startup script

#

However, when the server crashes, I want it to automatically restart.

#

I noticed in the spigot.yml file there is a line that says

restart-script: ./
#

Is the directory different on macos? Here's what I have so far

#
  timeout-time: 90
  restart-on-crash: true
  restart-script: ./start.command
  netty-threads: 4
pastel nacelle
#

don't use the restart script option

#

it is buggy and ought to be avoided

tranquil portal
#

How would I have it automatically recover after a crash?

pastel nacelle
#

instead, in your start script, use an infinite loop

tranquil portal
#

Right

pastel nacelle
#

to restart the server after the server process terminates

tranquil portal
#

Here's my script

#
#!/bin/bash
cd "$(dirname "$0")"
exec java -Xms8192M -Xmx8192M -jar spigot-1.16.1.jar -nogui
#

Would you have any idea how to do that

pastel nacelle
#

while true
do

tranquil portal
#

Just add that below?

pastel nacelle
#

above

tranquil portal
pastel nacelle
#

seems about right

tranquil portal
#

Unexpected end of file

#

uggggh

pastel nacelle
#

need to add done on the last line

tranquil portal
#

o

#

OHMYGODDD

#

THANKYOU SO MUCH <3

pastel nacelle
#
while true
do
java -jar paperclip.jar
echo "restarting in 10"
sleep 10
done
#

is the rudimentary start script pinned on the paper discord

tranquil portal
#

Awesome

pastel nacelle
#

(you should probably use paper by the way) 😎 1.16 performance is ass

tranquil portal
#

One last question, if that's okay

#

I just stopped the server, and it didn't automatically restart?

#

Does stop just kill the entire process outright, cause I'd like to throw this up on my physical server in real life, and know it'll restart if we have to force it to stop

tranquil portal
#

Feel free to ping me if anybody knows of a soultion

crimson sandal
subtle blade
#

+1 for Recipe instead of NamespacedKey

#

(something I failed to use when implementing various recipe-related functionality lol)

nimble stump
#

@tranquil portal just set up a script with a while loop that automatically restarts it whenever it shuts down

#

Barring a total process hang, that should solve your issue

pastel nacelle
#

that will likely come in handy

nimble stump
#

Actually your script already has that

pastel nacelle
#

what is the recipe list based on, again? I figure the server sends over a list of recipes at some point

nimble stump
#

Weird that it wouldn’t be working

quartz trench
#

has anyone else had an issue like this with AMD Navi GPUs on Linux

#

i can't find anything about it

#

happens in vanilla or with fabric/sodium

crimson sandal
#

Well @subtle blade I thought it would be a good idea to add a getRecipe(NamespacedKey) method to Bukkit, since Recipe doesn't actually have a Namespaced key only it's implementations. So you can get the recipe like this Recipe recipe = Bukkit.getRecipe(event.getRequestedRecipeKey());

subtle blade
#

It does have that already

crimson sandal
#

It does?

subtle blade
#

Yep

crimson sandal
#

Wait whut 😄

subtle blade
#

Oh, it doesn't. wot

#

I could have sworn that had existed

crimson sandal
#

Yeah it's only for an item stack 😄

subtle blade
#

Though in an event, definitely pass the Recipe instead of the NamespacedKey

#

If plugins need the key, they can fetch it from the recipe

#

(and not all recipes have keys, for that matter)

#

@quartz trench that looks to me like it would be a Fabric issue

crimson sandal
#

Well, let me show you the Event I have so far

subtle blade
#

Your graphics card is not going to change the render priority of the game like that

#

Try and lower your graphics settings (because you're on fabulous, try high instead), else try and replicate on vanilla

#

Though I'm inclined to believe it's Fabric

crimson sandal
tranquil portal
#

@nimble stump On /stop the server proceeds to shutdown and then says " Process Complete " in the console

#

It then stops.

#

I would expect it to either create a new window, or restart the server after a set delay,

nimble stump
#

How are you running it in the console

subtle blade
#

But how did you print out the recipe in the event, james?

tranquil portal
subtle blade
#

I see a hash value for a recipe there

crimson sandal
#

I added the implementation for getRecipe() in Bukkit too

subtle blade
#

oic, ic

#

Would have to be a separate PR. Though I would seriously advise passing the Recipe instead of the NamespacedKey

crimson sandal
subtle blade
#

I think md will request the same

quartz trench
#

Choco I did replicate it on vanilla without fabric. And the issue didn't happen with my gtx 970

#

started happening when I put in the 5700xt

nimble stump
#

@tranquil portal what are you doing to run that though

subtle blade
#

Also, is InventoryType#hasRecipeBook() another thing you added in that PR? That doesn't yet exist afaik

quick arch
#

packetplayinautorecipe is triggering me a lot 😦

#

no camel case

quartz trench
#

but Fancy instead of fabulous fixed it

#

hmmmm

#

sounds like it needs a bug report

subtle blade
#

If you can replicate in vanilla, yeah. Though search the bug tracker first. I'm sure it's been reported already

#

Or maybe even fixed in a snapshot

tranquil portal
#

I'm double clicking it, @nimble stump

quartz trench
#

Yeah hopefully. I have another screenshot of it happening with no mods and no fabric loader, vanilla 1.16.1

crimson sandal
#

Yeah it is something I added, there is currently no way to tell if any of the custom Bukkit inventories has a recipe book

subtle blade
#

Right

nimble stump
#

Try running it via terminal maybe @tranquil portal

#

That’s the only thing I can think of

#

That shouldn’t be it but

#

¯_(ツ)_/¯

tranquil portal
#

lol, sec.

subtle blade
#

Yeah, not saying it's a bad addition. Was just curious because I was not aware of such a method 😛

tranquil portal
#

it's working so far :P

#

let's see if stop works haha

#

oops I did it worng

crimson sandal
#

Yeah, if I removed the ability to change the requested recipe it would be possible to just contain the recipe in the event rather than namespacedKey

#

Since on the NMS side you have to convert the recipe back into a MinecraftKey

#

(If you're passing a new recipe back through the event)

subtle blade
#

Yeah, definitely no need for a setter there

nimble stump
#

@tranquil portal no don’t type the individual lines

#

sh “filename”

#

Without the quotes

crimson sandal
#

It works having a setter, but when I came to use it I realised it's just going to simulate clicking another recipe, which I can't think of an actual viable application for, you can just cancel the event and do what you want yourself 😄

subtle blade
#

ye

tranquil portal
subtle blade
#

You have access to the inventory, no?

#

Would just be able to do it that way

crimson sandal
#

Yeah I pass the InventoryView through

subtle blade
#

I'd argue that's likely better anyways

#

That's fine

#

getTopInventory() and getBottomInventory() respectively

crimson sandal
#

Yep

lone fog
#

Ooh more features

#

Exciting

tranquil portal
#

@nimble stump Sorry alex, it does actually wait the 5 seconds like I specified

#

but it doesn't restart the server

#

It just ends its self

nimble stump
#

Did you run it with the sh?

tranquil portal
#

Could you eleborate

crimson sandal
#

Also, you know how when you click a recipe and if you don't have the items, the inventory shows red slots, I'm guessing that's just a client side thing that only reacts to the recipe book packet.

nimble stump
#

brb driving

tranquil portal
#

All good, sorry for the bother.

crimson sandal
#

I was thinking it would have been cool if it was a packet that sets a certain slot to a placeholder item

hardy cedar
#
	public void Leave(PlayerQuitEvent e) {
		Player p = e.getPlayer();
		e.setQuitMessage("");
		if (this.frozen.contains(p.getName())) {
			for (Player players : Bukkit.getOnlinePlayers()) {
				if (players.hasPermission("GraveMC.ban")) {
					IChatBaseComponent comp = ChatSerializer
							.a("{\"text\":\"[CLICK TO BAN]\",\"hoverEvent\":{\"action\":\"show_text\",\"value\":\"§6click to ban\"}}");
					PacketPlayOutChat chat = new PacketPlayOutChat(comp);
					players.sendMessage(ChatColor.DARK_AQUA + "---------------------------------------------");
					players.sendMessage(ChatColor.RED + "The player " + p.getDisplayName() + ChatColor.RED
							+ " has left the server while he was frozen and he got unfrozen");
					((CraftPlayer)players).getHandle().playerConnection.sendPacket(chat);
					players.sendMessage(ChatColor.DARK_AQUA + "---------------------------------------------");
					this.frozen.remove(p.getName());
				} else {
					return;
				}
			}
		} else {
			return;
		}
	}``` i want this click to ban to run the command /ban p.getName() :0 is that possible? Or i need other method
pastel nacelle
#

yes, there is a json component for that

hardy cedar
#

So not this method

pastel nacelle
#

you need to send them text/json components, otherwise the same as what you are doing right now

#

well, looks like you are manually writing json and having it parsed...

#

use a clickEvent run_command

hardy cedar
#

If i used run_command on this i cant get player name

pastel nacelle
#

and why not

hardy cedar
#

Because it's between "" duh

pastel nacelle
#

you are literally writing strings

quick arch
#

Just parse em'?

pastel nacelle
#

"string" + p.getName() + "rest of string"

lone fog
#

Why can’t we have the $”” feature from C#

wind dock
#

WARN Advanced terminal features are not available in this environment

#

What does this mean

pastel nacelle
#

there is String.format

lone fog
#

Yeah but not quite as convenient

potent oxide
#

Why this not working?

plugin.getConfig().getStringList("blacklist-word").add(word);```
south talon
#

you need to get the string list

#

to a variable

#

then add the value

#

and then save to the config

nimble stump
lone fog
#

Anything ever happen with that tool tag system that was discussed?

subtle blade
#

?

quick arch
#

sounds like persistent data containers

pastel nacelle
#

PDC for chunks when

quick arch
#

Isn't it being worked on in the fork

pastel nacelle
#

myes

crimson sandal
#

Oh nice, I didn't realise you could add custom recipes to the recipe book too 😄

lone fog
#

“The fork”

quick arch
#

yes, "the fork"

pastel nacelle
#

the only significant fork

frigid ember
#

which fork

quick arch
#

You can add custom recipes to a lot of things

pastel nacelle
#

the fork with >50% market share on modern versions 😎

lone fog
#

The crusher of scissors

#

Wait no that’s rockspigot

quick arch
foggy topaz
#

Hey there, so my plugin is getting Review bombed by a bunch of kids making alt accounts and blank reviews? Anyone around who might be able to help directly?

This is def frustrating. >.>

pastel nacelle
#

don't most of those already support them?

lone fog
#

Furnace has support doesn’t it

pastel nacelle
#

furnace for sure has at least

quick arch
#

yeah pretty sure it does

crimson sandal
#

I knew you could add custom recipes, I didn't know they shown up in the recipe book too if you call player.discoverRecipe() 😛

pastel nacelle
#

i would expect that by association the furnace clones do, too

lone fog
#

And crafting table does :p

frigid ember
#

how do u make furnace recipe require certain type of itemstack

#

instead of just material

crimson sandal
#

I made a PR the other day for PrepareSmithingEvent 😛

subtle blade
#

Isn't it being worked on in the fork
It's being worked on in Spigot. There's a PR open

frigid ember
#

i know for crafting u can use PrepareItemCraftEvent but havent found one for furnace

subtle blade
#

Furnaces aren't really preparable

pastel nacelle
#

i don't think the datapack based recipes support anything other than material yet

subtle blade
#

There's ItemSmeltEvent though

lone fog
#

Ooh preparesmithingevent

frigid ember
#

o

lone fog
#

ExactChoice doesn’t work for furnace recipes does it

quick arch
#

It's being worked on in Spigot. There's a PR open
Oh, that means instead of storing all my data in a chest, I can store it in a chunk! >:)

subtle blade
#

ExactChoice only works for shaped recipes at the moment

lone fog
#

Yeah that’s what I thought