#help-development

1 messages Β· Page 1588 of 1

eternal night
#

which includes the jitpack info

quiet ice
#

that being said, I distrust codemc, so we will disregard the pom entry

ivory sleet
#

Yes

quaint mantle
#

the Bukkit.getServer().getDeclaredField(.. gives me a NoSuchFieldException

quiet ice
#

that shouldn't compile

quaint mantle
#

i forgot to try{ it

eternal night
#

this should still not compile xD

ivory sleet
#

Get it from simple plugin manager

quaint mantle
#

SimplePluginManager?

#

alr

#

yeah idk what im doing anymore

eternal night
#

well add the respective catch blocks

quaint mantle
#

HEH,??? it only wanted "Try" and "finally" just a second ago

#

LOL

#

K i did some auto stuff

#

hope this is right 😭

#

ima make something to try it lmao

chrome beacon
#

So uh why are you accessing the command map

quaint mantle
#

get command permissions

#

non-plugin command permissions

ivory sleet
#

Field f;
try {
(f = SimplePluginManager.class.getDeclaredField("commandMap")).setAccessible(true);
CommandMap map = f.get(getServer().getPluginManager());
return map;
} catch (ReflectiveOperationException e) {
e.printStackTrace();
}
return null;

Wrote on phone but that should work

quaint mantle
#

yeah

#

that looks so much easier

#

i'll try both, thanks so much for the help πŸ™

lyric grove
#

Im getting this error

#

on the spawnCannon line

quaint mantle
#

why are you on 1.7

#

wait

rain lynx
#

How to protect plugin?

quaint mantle
#

what server version are you running

quaint mantle
lyric grove
quaint mantle
lyric grove
#

yes, it still is minecraft and this error is caused by me not 1.7

rain lynx
#

Players can use /pl a

quaint mantle
rain lynx
#

I cant protect this command

ivory sleet
lyric grove
#

anyone know whats causing the ArrayIndexOutOfBoundsException?

quaint mantle
#

have you set args?

fluid cypress
#

i dont get any error in the pom.xml, but i still cant use it... it doesnt exists, at least for intellij

lyric grove
#

you can see in the code

quaint mantle
#

i cant see if args is set but i''ll assume it is

eternal night
#

reload your intellij maven representation

fluid cypress
#

how

quaint mantle
#

because the ArrayIndexOutOfBoundsException is caused by trying to access an index that isnt accessible//out of bounds

lyric grove
eternal night
#

open the maven tab -> click the reload like character

chrome beacon
lyric grove
quaint mantle
lyric grove
quaint mantle
#

but i mean, i would personally lol

viscid edge
#

anyone know javascript?

fluid cypress
chrome beacon
quaint mantle
lyric grove
viscid edge
quaint mantle
chrome beacon
#

Should be fine here

quaint mantle
#

i just dont see where it relates to serious bungeecord programming/development help

chrome beacon
#

It's development either way

viscid edge
#

i'm just wondering how to make a javascript website

chrome beacon
viscid edge
#

besides plugins are made in java

chrome beacon
quaint mantle
#

why not just use #verified instead of clogging a channel where people need help

quaint mantle
viscid edge
#

i need help

chrome beacon
#

With?

viscid edge
#

a website

quaint mantle
#

what about the website

viscid edge
#

do u have any css tutorial

quaint mantle
#
nocturne coral
#

i'm brand new to this plugin dev thing and i get the error The import org.bukkit cannot be resolved and I think it's becuase my server jar isn't in the correct place. my file structure: https://ibb.co/gmT9M8t

chrome beacon
lyric grove
chrome beacon
nocturne coral
#

org.bukkit.plugin.java.JavaPlugin;

lyric grove
quaint mantle
#

yeah add spigot to your build path or pom.xml

nocturne coral
#

ok thanks

chrome beacon
lyric grove
#

it is?

#

wdym

chrome beacon
#

You're not accessing an array here

lyric grove
#

who keeps reacting can you stop?

viscid edge
#

anyone know any good forums software

quaint mantle
chrome beacon
viscid edge
#

k

lyric grove
#

here is the error, its on enable

quaint mantle
#

so what version of spigot/paper are you using

#

because it seems like your server version is 1.7

chrome beacon
quaint mantle
#

well im speaking in their pom.xml

#

or build path

chrome beacon
#

Oh

lyric grove
#

but i am implementing CommandExecutor

lyric grove
quaint mantle
#

idk m9

lyric grove
#

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

chrome beacon
lyric grove
chrome beacon
#

3 n

regal dew
#

Whats bLib line 145

chrome beacon
#

He showed it

regal dew
#

is it line 145 though

chrome beacon
#

I already found the issue

chrome beacon
regal dew
#

ah right

lyric grove
#

whats the issue?

chrome beacon
#

Typo

regal dew
#

You’re trying to retrieve β€œcannon” from the plugin.yml, but it’s written β€œcannnon”

lyric grove
#

lmao thank you

granite stirrup
#

Hi

hoary knoll
#

is there a way to throw exceptions on JavaPlugin#onEnable?

#

nvm

ivory sleet
#

Throw a runtime one or sneaky throw

flat kindle
#

I have an issue with mysql

#

The url is not working for some reason

#

It says there is an issue with the input string for the URL as seen in the screenshot

#

the URL is within a config file

#

is there an issue with Strings in config files?

eternal night
#

this is not how a mysql jdbc connection string should look is it ?

flat kindle
#

it didnt change

eternal night
#

yeah so why are you passing (looks like a user using '@'), are missing the jdbs:mysql:// prefix etc

#

or what are you passing to the connection driver

flat kindle
#

the file it self

eternal night
#

yeah why are your user and password part of the string ?

flat kindle
#

how do I format code?

eternal night
#

what xD

flat kindle
#

actually I could send the file itself

#

In discord

eternal night
#

?paste

undone axleBOT
flat kindle
#

The set connection method passes 3 args

#

the url for the connection

#

the user

#

and the pass

eternal night
#

Yes but your databaseUrl already contains user and password

flat kindle
#

Ok so thats the issue?

#

thank you

eternal night
#

Give it a try

granite stirrup
eternal night
#

idk if that is your issue /shrug

flat kindle
#

Actually I looked at my other project

#

the user and pass go along with the URL within the method

#

even tho the url may contain the username itself

eternal night
#

Rule of thumb tho, you don't wanna include it in your url πŸ˜‚

hoary knoll
#

@granite stirrup it has to be unchecked

#

the super function does not throw any exceptions it self

#

if it was JavaPlugin#OnEnable throws Exception then it would work

eternal night
#

then try-catch it and wrap it in a runtime exception ?

#

why would it have to be unchecked

hoary knoll
#

also, how do you disable the Bukkit plugin.yml json schema in eclipse?

#

@eternal night thats what im doing

frosty mauve
#

hello guys and there's a very important question for me and I need some helps.
In 1.16.5,I want to listen the PlayerInteractEvent but I suddenly find that only the left click air and right click block will call the event,left click block and right click air will not call it.What's wrong with it?Or it's my question?Thanks!

eternal night
frail knot
#

Can anyone tell me how I can add 1.17 support to my plugins? since it's java 16 for 1.17

hybrid spoke
#

set java 16 as your project sdk

#

and import the spigot 1.17 jar into your plugin

valid solstice
#

i made my first plugin but and put the jar file in the plugin folder, but for some reason its not loading up when i execute /plugins. Anyone know why this is happening?

eternal night
#

missing plugin.yml ?

#

there should be errors in the console when starting the server

valid solstice
#

1 sec

shy wolf
#

how can i stop Runnable task?

#

?jd

eternal night
eternal oxide
valid solstice
#

its saying that org.bukkit.plugin.InvalidPluginException: Cannot find main class `com.TheB2D.IntroPlugin'

#

any idea how to fix that

eternal night
#

well seems like your plugin main class is not where you said it is

valid solstice
#

ah

eternal oxide
shy wolf
eternal night
#

are you sure you are working on a bukkit task

shy wolf
#

taskID = Bukkit.getScheduler().scheduleSyncRepeatingTask(plugin, new Runnable()

valid solstice
#

thanks! fixing it now

eternal night
#

yikes, imagine still using task ids

dense remnant
#

Hey I want to change all dirt blocks to tnt in a world.

I tried it with ChunkPopulateEvent but it causes stackoverflow errors and doesnt really work and makes the server lag:

@EventHandler(priority = EventPriority.MONITOR)
    public void onChunkPopulate(ChunkPopulateEvent e) {
        for (int x = 0; x < 16; x++) {
            for (int y = 0; y <= 131; y++) {
                for (int z = 0; z < 16; z++) {
                    System.out.println("Should have changed something");
                    Block block = e.getChunk().getBlock(x, y, z);
                    Material material = block.getType();
                    if (material.equals(Material.DIRT))
                        block.setType(Material.TNT,false);
                }
            }
        }
    }

And writing an own generator also doesnt work because it doesnt contain the default generator.
What should I do to solve this problem?

eternal night
#

that should not make a difference xD

valid solstice
#

An error occurred while i was starting up the plugin in my server this is what it told me java.lang.UnsupportedClassVersionError: com/TheB2D/IntroPlugin has been compiled by a more recent version of the Java Runtime (class file version 60.0), this version of the Java Runtime only recognizes class file versions up to 52.0 Any idea how to fix it?

eternal night
#

seems like you are running your server using java 8

#

please run it using java 16

valid solstice
#

So i would install java 16 right?

eternal night
#

yea

valid solstice
#

thanks

hybrid spoke
eternal night
#

I mean your stackoverflow issue is caused by editing edge blocks isn't it ?

#

those would load the next chunk etc

hybrid spoke
#

possible

dense remnant
#

ChunkLoadEvent would replace any dirt block after loading, even though they were modified by a player

dense remnant
young knoll
#

isNewChunk

dense remnant
#

Okay

#

Whats the advantage of using the chunk load event?

hybrid spoke
hybrid spoke
dense remnant
#

So ChunkPopulateEvent would be better for that purpose, right?

eternal night
#

you could use setBlock(BlockPos pos, BlockState state, int flags, int maxUpdateDepth) in Level for it

#

passing in maxUpdateDepth of 0 should prevent updating/generating neighbour chunks

#

default update depth is 512

#

flag is respectively 2 | 16 | 1024 (that is at least what craftbukkit uses

#

which becomes 1042 after bit manipulation

dense remnant
#

Umm okay what I have now (My code just without the event priority) works fine with a nice tps and everything
... but not for the first chunks in the world

young knoll
#

load: STARTUP in plugin.yml?

dense remnant
waxen plaza
#

Is there an easy way to loop trough the section I highlighted? I tried making a custom method to do this but it's kinda annoying to use..

dense remnant
#

Is there any way to make explosions less laggy?

waxen barn
#

how can I automaticly reobfuscate 1.17 nms in intellij idea?

waxen barn
#

and then convert the x and y co slot id

eternal night
#

didn't the spigot post elaborate how to reobfs code

waxen barn
young knoll
#

You could make a static array of the slots

#

Or do some math

waxen plaza
waxen barn
eternal oxide
#
for (int column = 1; column  < 6; column++) {
  for (int row = 1; row < 4; row++) {
    int slot = (row * 9) + column;```
eternal night
#

if you aren't using a build tool, you should not be coding NMS tbh

#

at least not post 1.17 NMS

young knoll
#

I think you missed a few columns in that loop

eternal oxide
#

missed the outside columns

young knoll
#

Aren’t you only looping 5 columns

eternal oxide
#

yes, its just an example so he can see the logic

waxen plaza
#

I'll modify it a bit to work with others inventory sizes aswell

waxen barn
# eternal night if you aren't using a build tool, you should not be coding NMS tbh

i am using wired system, that isn't really the best thing that i can use, but it was easiest solution and it is, that I use maven for dependencies, but I compile it using the intellij compiler and I have tons of artifact, that automatically deploy the jars to the spigot servers and I am not maven expert, so I don't know how to do it better

#

the goal was mostly to make it as easy, that I hit ctrl + F9 and all jars are updated

eternal night
#

I guess you could make a compound intellij run configuration

#

that executes the cmd after you compile your jar

waxen barn
#

ok, i am going to have lunch and then I'll try it

dense remnant
#

Is there any way to stop tnt from exploding from lava in newly generated chunks if I would change all dirt to tnt?

river dirge
dense remnant
#

Already did that but there is the possibility that lava is next to tnt on generation

river dirge
dense remnant
#

Idk I mean that I just replace blocks when a chunk is populated (event)

summer scroll
river dirge
dense remnant
#

New generated

river dirge
dense remnant
#

Yes

river dirge
# dense remnant Yes

then look how a chunk is generated because without knowing that. Or you will have to add an event that destroys entities bcs when tnt goes in exploding modes it becomes an entity right? This last method will be inefficient. so try to understand how a chunk is generated ant then try to alter the chunck generation in an efficient way πŸ™‚

opal juniper
river dirge
opal juniper
#

meh idk then

#

it works fine for me

#

what does the "sendPacket" do

summer scroll
#

java.lang.NoSuchMethodError: 'void net.minecraft.network.protocol.game.PacketPlayOutEntityDestroy.<init>(int[])'

summer scroll
opal juniper
#

u are using reflection right?

eternal night
#

is the class still called that

opal juniper
#

yeah i think so lynx

dense remnant
summer scroll
opal juniper
#

oh

summer scroll
#

I use 1.17.1 buildtools, do you need to modify the remapped thing?

#

I don't even use the remapped-mojang

opal juniper
#

not sure

river dirge
ivory sleet
#

The superclass doesn’t have that throws declaration for onEnable

flat kindle
#

@eternal night so I tested out the the method for get Connection

#

turns out this works

#

the same way it is done within my code of the plugin

#

leading me to believe there might be some sort of an encoding issue within the .yml files

eternal night
#

If you do not include your user/password in the URL and use ' you should be good

flat kindle
#

wdym by using ' ?

eternal night
#

single quotes

river dirge
eternal night
waxen plaza
#

What are default volume and pitch when using the sound method?

hybrid spoke
#

1 i guess

drifting thorn
#

How to Remove a Player from the Tablist?
PacketPlayOutPlayerInfo(EnumPlayerInfoAction.b, npc) doesnt work and PacketPlayOutPlayerInfo(EnumPlayerInfoAction.REMOVE_PLAYER, npc) doesnt exist in the newest version

sour mulch
#

have a question ,i have a server on 1.17.1 but i see that not that much has come out on it many things are still not updated to 1.17.1 and stayed on 1.17 so i was thinking will mods of 1.17 work in 1.17.1?

sour mulch
#

thats nic

#

thx

hybrid spoke
#

^^

twilit vector
#

is there a way to keep calling some code?

sour mulch
river dirge
twilit vector
#

no like

#

onEnable

#

something like that

river dirge
hybrid spoke
twilit vector
river dirge
hybrid spoke
#

or even the bukkit scheduler

river dirge
hybrid spoke
#

no.

twilit vector
#

does it work like onEnable?

hybrid spoke
#

a thread is totally redundant and will do nothing than throwing errors because of thread-safety

twilit vector
#

ok so i will not do that

hybrid spoke
twilit vector
#

ohk

#

nvm

hybrid spoke
#

or do you mean inside or at the onEnable method?

twilit vector
#

my friend told me smtg else

river dirge
twilit vector
#

and i believed him

#

so basically what i want is

hybrid spoke
twilit vector
#

a piece of code should run whenever the user says a command

#

but that code is in a different class

river dirge
twilit vector
#

forget what i told before

hybrid spoke
#

and also not. the bukkit api is not made for multi threading. it will throw concurrent exceptions as long as you don't use thread-safe methods just like broadcastMessage or so on

twilit vector
hybrid spoke
river dirge
twilit vector
#

uhm i dont know what any of this is

twilit vector
river dirge
twilit vector
#

i dont want it to be called at a certain time

#

i want a code from a different class

#

to be called

river dirge
hybrid spoke
#

either just call the method or as i said use a callback. you could use a consumer and accept later on the player which executed the command.

twilit vector
#

ohk

hybrid spoke
twilit vector
#

so ill research about callback

#

Tank you!

hybrid spoke
#

πŸ‘

#

minecrafts server software is written linear except some parts

river dirge
#

BTW i asked myself this question maybe you know it. Is it possible to change the server tick rate?

hybrid spoke
hybrid spoke
torn shuttle
#

asking again from a few days back, is there any good way of seeing if someone is using the bedrock edition using protocol trickery without relying on checking specific APIs for it? are there any tell-tale signs?

paper viper
#

Threads are pretty expensive

#

Use them wisely

ivory sleet
#

Executors 😌

paper viper
#

Exactly

hybrid spoke
#

^^

paper viper
#

I was about to say that

#

Run a compeltable future using Executors

ivory sleet
#

Ye

river dirge
dusk flicker
undone axleBOT
hybrid spoke
river dirge
paper viper
paper viper
#

Btw here’s a plugin for that

river dirge
nocturne coral
#

In Spigot, is entity health dealt with in hearts or half hearts (as in 10/player or 20/player)?

paper viper
ivory sleet
#

Well client and server is different my guy

nocturne coral
#

Thanks

quaint mantle
#
<dependency>
    <groupId>me.imaginedev</groupId>
    <artifactId>GalaxyShopAPI</artifactId>
    <version>v1.0.0</version>
    <scope>compile</scope>
</dependency>
<groupId>me.imaginedev</groupId>
<artifactId>GalaxyShop</artifactId>
<version>v1.0.0</version>
<packaging>pom</packaging>

<name>GalaxyShop</name>

<properties>
    <java.version>1.8</java.version>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

<modules>
    <module>api</module>
</modules>
summer scroll
#

What is the packet name to make entity ride another entity?

hybrid spoke
river dirge
# ivory sleet Well client and server is different my guy

hmm. so we can see the client and server relationship as a type of queue at the server end. now every tick the server handles requests then? Increasing the tick rate will give a smoother experience. But doesnt the client act like a single world with an own mind with little input from the server then? If we increase the tick rate will the client world view be a little more correcter?

paper viper
#

Simple answer is to not do it

#

Don’t use this method of a Queue

hybrid spoke
#

for the client it would be cancer

paper viper
#

It will have so many modifications per tick and you would have to rework a ton of things

hybrid spoke
#

and the server would literally burn

paper viper
#

Mhm

summer scroll
# hybrid spoke attach or mount

Attach Entity
This packet is sent when an entity has been leashed to another entity.
and for the mount, they only have 1 parameters which is doesn't make sense

river dirge
#

Its just all hypothetical. its to understand the inner working of the whole system. Also its quite nice how they have made it πŸ™‚

hybrid spoke
summer scroll
river dirge
hybrid spoke
#

i've used attachentity in 1.8 since there was no mount packet. now there is, so use that. attach entity should also work since it attachs an entity to another

summer scroll
#

but there's only 1 parameter on the PacketPlayOutMount

hybrid spoke
#

as i said, the packet should have methods to modify it

summer scroll
#

I don't see the methods to modify the passengers

flat kindle
#

@eternal night how would I go on about adding single quotation signs in the yml file?

#

Without manual editing

eternal night
#

by manually editing it ? it is a configuration file what

river dirge
#

\'

eternal night
#

your plugin is not going to provide actual credentials by default is it

flat kindle
#

Ofc not

#

but a user is supposed to provide a url and other form of creditentials

eternal night
#

Yea, and if their password requires it to be escaped/used in single quotes it is their job

flat kindle
#

But the url cannot work since it isnt provided as an arbitrary string

grim ice
#

Anyone can help me

#

im making a spigot plugin where there are custom recipes

#

and

#

I don't have a clue of how to make a custom recipe

dusk flicker
#

Google

grim ice
#

i googled

dusk flicker
#

Then you didn't google good

eternal night
#

google harder

dusk flicker
#

Theres a wiki about custom recipes on Spigot

grim ice
#

i got a result of Create a ShapelessRecipe and register it with Server#addRecipe(); To listen for what player crafted the recipe, you will have to listen for a CraftItemEvent

dusk flicker
#

"custom recipes spigotmc" and you will get the wiki

river dirge
dusk flicker
#

Dear lord no

#

Use the spigot one

eternal night
#

bukkit docs LMAO

dusk flicker
#

Bukkit docs are so out of date

#

& not actively maintained

river dirge
unkempt ore
#

I cannot change the block data of an air block for the life of me. I don't understand. I have a BlockData, and I try to set it to a set of blocks, but the air blocks don't get affected

flat kindle
#

@eternal night @river dirge

dusk flicker
#

Bukkit's docs could be almost the same but prob won't be

river dirge
dusk flicker
#

Considering Bukkit is abandoned theres a reason why a lot of stuff is being moved to the spigot wiki

grim ice
#

thx

#

I read it and this is so god damn useful

#

u guys r great

quaint mantle
#

can i detect armorstand damage?

#

EntityDamageByEntityEvent doesn't work

eternal night
river dirge
eternal night
#
url: 'myLiteralURL.com'
flat kindle
eternal night
#

should be enough

quaint mantle
# quaint mantle `EntityDamageByEntityEvent` doesn't work

my armorstand spawn code is:

ArmorStand stand = world.spawn(location, ArmorStand.class);
        stand.setInvisible(true);
        stand.setVisible(false);
        stand.setBasePlate(false);
        stand.setMarker(true);
        DataContainer.setKey(stand, "distracting");
        golem.setTarget(stand);
dusk flicker
#

Spigot has always been a bukkit Fork

eternal night
#

I don't know if spigots yaml interfacing allows for specific use of single quotes

hybrid spoke
#

you cant even interact with it if its a marker

dusk flicker
#

Just Bukkit is abandoned and Spigot maintains its fork now

quaint mantle
unkempt ore
#

Haven't done that but I'd guess that'd be how

eternal night
#

Escaping is ugly if there is string literals

hybrid spoke
quaint mantle
#

i need to set golem's target

river dirge
dusk flicker
#

Bukkit's team left as it was revealed Mojang owned them and one of the devs filed a DMCA

#

?dmca

undone axleBOT
eternal night
dusk flicker
#

That will have some more info

waxen barn
#

When I use the command from spigot forums to obfuscate nms, it gives me this error

Error: Could not find or load main class net.md_5.specialsource.SpecialSource
Caused by: java.lang.ClassNotFoundException: net.md_5.specialsource.SpecialSource

what should I do?

eternal night
#

are you running it in git bash ?

#

or are on a unix based system

waxen barn
#

nope, windows cmd

eternal night
#

give it a try in git bash

river dirge
quaint mantle
#

Main Pom

<groupId>me.imaginedev</groupId>
<artifactId>GalaxyShop</artifactId>
<version>v1.0.0</version>
<packaging>pom</packaging>

<name>GalaxyShop</name>

<modules>
    <module>api</module>
</modules>

<!-- ... -->
<dependency>
    <groupId>me.imaginedev</groupId>
    <artifactId>GalaxyShopAPI</artifactId>
    <version>v1.0.0</version>
</dependency>

api module's pom

<groupId>me.imaginedev</groupId>
<artifactId>GalaxyShopAPI</artifactId>
<version>v1.0.0</version>
<packaging>pom</packaging>

<name>GalaxyShopAPI</name>

<!-- ... -->
<dependency>
    <groupId>me.imaginedev</groupId>
    <artifactId>GalaxyShop</artifactId>
    <version>v1.0.0</version>
</dependency>

https://prnt.sc/1ed5hmz
and heres the error ☝️

Lightshot

Captured with Lightshot

dusk flicker
#

Of Bukkit?

#

SPAM

quaint mantle
#

maven people go to work

eternal night
#

?paste imagine using

undone axleBOT
dusk flicker
#

As Spigot is built on bukkit is has to be maintained

quaint mantle
dusk flicker
#

you filled the entire channel

eternal night
#

did you just link us an error from your IDE πŸ˜‚

quaint mantle
#

aint my fault there arent two of em

eternal night
#

fam run mvn package and link the output

waxen barn
eternal night
#

also why is your API packaged as a pomn

unkempt ore
#

Or just don't use Maven

#

All your problems gone

quaint mantle
#

gradle == shit

eternal night
#

next question, why does your API depend on your implementation πŸ˜‚

unkempt ore
#

What the fuck is wrong with you

#

XML = FML

dusk flicker
#

admittedly mavens error system is fucking shit

eternal night
#

idk, if I wanna waste 10 days to update all my project to the next breaking release of gradle I must really enjoy pain

quaint mantle
river dirge
dusk flicker
#

see

unkempt ore
#

It's a fork dude

#

They have the source

#

And modified things

quaint mantle
#

?stash

undone axleBOT
eternal night
#

Yea api depending on impl doesn't make much sense, concerning that your implementation would need to depend on your api to implement the api interfaces

dusk flicker
#

Spigot modifies things but not that much

quaint mantle
#

can you help?

humble relic
#

would anyone be able to help me with skript?

dusk flicker
#

NO

eternal night
#

with modules ? xD

quaint mantle
dusk flicker
#

Go to Skripts discord

eternal night
#

skript has their own discord, you should ask there

dusk flicker
#

we hate skript

humble relic
dusk flicker
#

fake programming

quaint mantle
#

lua x .txt

dusk flicker
humble relic
#

lol

#

thx

dusk flicker
#

took me 1 second on google

unkempt ore
#

The point of an API is to segregate the implementation. You only want your implementation to depend on the API, not the other way

quaint mantle
#

might as well be this:

if the event's player's name is "Hi" then
    send them the message "&4Bye"
quaint mantle
unkempt ore
#

I see

river dirge
quaint mantle
#

im wondering why its not working i dont care about the implementation

dusk flicker
#

anything but skript

eternal night
#

well, you have a root mvn project right ?

unkempt ore
#

I mean isn't Skript technically a language?

quaint mantle
#

yeah

eternal night
#

which lists both your API and your impl as modules

unkempt ore
#

As bad as it may be, it still is programming

quaint mantle
eternal night
#

I'd hope so o.O

unkempt ore
#

Take Brainfuck for example, that's a programming language. It's not useful at all but it's just kinda there

quaint mantle
#

killer of entity can be someone else besides Player in PlayerDeathEvent?
if (e.getEntity().getKiller() instanceof IronGolem) doesn't work

dusk flicker
#

The problem with skript is it is so used and the performance is crap

unkempt ore
#

People do not care

dusk flicker
#

And most of the skript programmers dont know when to not use skript

river dirge
dusk flicker
#

People will make entire gamemodes out of skript and wonder why the performance is shit

quaint mantle
#

only time to use skript is to send a message on command

unkempt ore
#

They just wanna get it done. It's a Python situation, just wanna get it done with not as much regard to how it'll actually perform

dusk flicker
#

My performance with my java plugin is amazing doin't know what you're on about

eternal night
#

if you aren't running a 10k player network but rather a small server, skript works well lol

unkempt ore
#

Ummmm, of course it is?

#

But people aren't gonna learn Java

#

Lmao

#

Clients are incredibly lazy

dusk flicker
#

I was replying to trolking

unkempt ore
#

Ah

dusk flicker
#

One time I didn't use the reply function lmao

eternal night
#

I have seen enough java developers that manage to screw their performance

unkempt ore
#

Well, that's pretty normal

dusk flicker
#

welllll

river dirge
dusk flicker
#

I knew someone that ran a task every millisecond

eternal night
#

the overhead of skript is also being reduced with every other release in which they update their interpreter

dusk flicker
#

and wonder why it caused a performance drop

unkempt ore
eternal night
#

one day, skript might just be the JS of spigot

unkempt ore
#

No

eternal night
#

and there you go

dusk flicker
#

Nope1

#

Lmao

unkempt ore
#

WHAT?!?!

#

NOT ASYNC?! LOL

dusk flicker
#

Yeah

#

LOL

waxen barn
dusk flicker
#

They would do checks every millisecond in an update task

river dirge
dusk flicker
#

For no reason xD

quaint mantle
#

not async tick = plugin in datapack edition

#

1000checks/second

unkempt ore
#

No scheluding

dusk flicker
#

My update task runs every 5 seconds but its being difficult to me lmao

#

Like for whatever reason something is meant to run every 30 seconds but it takes 4 minutes and 11 seconds

unkempt ore
#

Surely your system clock is busted

#

Destroy your computer

grim ice
river dirge
eternal night
#

I was waiting for the NNY alt to come online

#

lol

grim ice
#

will I find the recipe

#

in the Recipes section

dusk flicker
grim ice
#

in minecraft

#

like the book thing

unkempt ore
#

Ohhhh noooo two whole seconds

dusk flicker
#

there we go its now +0.028 s

quaint mantle
#

@dusk flicker add stuff to your website

dusk flicker
#

no

#

its amazing

quaint mantle
#

lazy

dusk flicker
#

ya know what I might actually make an update task in a standalone project

#

and shade it in xD

river dirge
ivory sleet
grim ice
quaint mantle
#

ye

dusk flicker
#

I believe so

grim ice
#

Great

quaint mantle
#

i was thinking of adding spawner support to my shop plugin, since everything runs through PDC's, people wouldn't care if they didnt stack with other plugins right? who cares about stacking spawners in your inventory. now adding spawner stack support to other spawner plugins may be a problem. anyone got thoughts on this

river dirge
dusk flicker
#

I've never used PDCs

#

xD

quaint mantle
grim ice
#

i finished it yesterday

#

LOL

quaint mantle
#

?

eternal night
#

imagine not knowing what pdc is 😒

grim ice
#

i meant the idea

dusk flicker
#

?pdc

grim ice
#

not holder

#

container

#

:)

#

REKT

quaint mantle
eternal night
#

actually

#

rip

dusk flicker
#

lmao

eternal night
#

REKT the other way around

flat kindle
#

@eternal night @river dirge so I was searching for a while now,and cant really seem to find a solution for my issue

#

Spigot does not provide a built in way to write the single quotes?

eternal night
#

idk why you want your plugin to set defaults in a yaml config uses single quotes 😒

ivory sleet
full holly
#

How can I send a plugin message from spigot to BungeeCord?

dusk flicker
#

PluginMessagingChannels

#

?pmcs

#

?pmc

dusk flicker
#

oh shit that exists

dusk flicker
full holly
#

thx

flat kindle
river dirge
dusk flicker
#

Its the bungee server

eternal night
#

Yes but then have whoever puts the url with fucked characters that need to be escaped add single quotes

dusk flicker
#

You would need to get the data from the server somehow, prob with PMCs

#

View link:

#

?pmc

river dirge
near crypt
ivory sleet
river dirge
dusk flicker
dire marsh
#

no

#

it has queues

ivory sleet
#

There’s no plausible way it could be done synced

dire marsh
#

they run their own thread

ivory sleet
#

No

near crypt
#

@dusk flicker there is a huge error in the console that says that there is an error in the connect method

#

in line 15

ivory sleet
#

Client and server just spam packets to each and another. Server intercepts them async using netty, then if it needs to be done synced then it just makes sure it’s done synced. Client itself iirc doesn’t tick (might be wrong) at all, it just reacts to server packets and user inputs.

grim ice
#

Hello

#

will

#

recipe.shape(" E ", " E ", " S ",
" E ", " D ", " S ",
" E ", " E ", " S ");

#

work

#

I don't know if I'm doing it wrong

#

because i want it to be 9 slots

#

(all of them)

near crypt
#

@ivory sleet and how can i connect the player to the lobby server when he types /lobby?

ivory sleet
#

Implement a bungee command using a bungee plugin is the easiest way

dusk flicker
#

Re-read the docs

near crypt
#

okay

dire marsh
#

or you can just use the connect plugin channeel

dusk flicker
#

"123", "456", "789";

grim ice
#

Oh!

#

thanks

granite stirrup
#

Oh no a troll Is typing

hybrid spoke
#

but you already sent your message?

river dirge
dire marsh
#

packets are constantly being sent

#

you can see how many in the f3 menu

#

tx and rx

river dirge
# ivory sleet Wym?

samB440 answered it already. i was questioning if the client had a set tick rate too.

dire marsh
#

the keepalive packet is the important one

river dirge
#

but they should be encrypted so we cant watch the packets sadly 😦

dire marsh
#

?

quiet ice
river dirge
#

after a connection packet is send to the server client. the client has to send an encryption packet. after that i suppose all communication is encrypted so we cant see the contents of the packets 😦

quiet ice
#

Except if you are in offline mode

grim ice
#

@dusk flicker

#

recipe.shape("RDR", "DZD", "RDR");

#

is this fine

dusk flicker
#

yep

#

Then you define R and D and Z (im blind)

river dirge
# quiet ice Except if you are in offline mode

thats a thing i didnt know πŸ™‚ intresting. the link you gave me is rlly nice. I saw the mc protocl wiki page. I did try to make a connection to a python server client i quickly made and got a respone i was pretty satisfied with that already xd

willow oar
#

how do I break a door? It always breaks only half of it

dire marsh
#

what version are you on

willow oar
#

1.16.5

dire marsh
#

Block#breakNaturally?

willow oar
twilit vector
#

is there a way to use world edit's copy feature with my plugin?

Basically I want it so that someone can select an area and then whenever someone enters that area i want to show a message

silk mirage
#

worldedit api

quiet ice
#

what is not working

quaint mantle
#

is that swedish

#

its polish

twilit vector
silk mirage
#

?paste

undone axleBOT
silk mirage
#

use that

quaint mantle
#

😐

silk mirage
#

jkjk

quaint mantle
#

what a loser

near crypt
#

how can i send a player to a server in BC? i never used BungeeCord before sorry

paper viper
#

com.src4sell.SrC4Sell.Main

#

Wtf is that class

#

The package name too

#

😫

eternal oxide
#

anyone stupid enough to buy that source is asking for trouble.

quaint mantle
hybrid spoke
#

the whole naming is fucked com.src4sell.SrC4Sell.Main.onJoinLockdown

#

nvm

#

on is lowercase

#

it

#

nvm

eternal oxide
#

just the fact that they used Main is enough of a "steer clear" message

eternal oxide
#

Not making fun of you, criticising code is constructive

near crypt
#

but not in this way this is just broken

#

this is not the way to criticising

eternal oxide
# near crypt Bro dont be toxic

Thats not toxic. Main is the name of a class for an executable application, not the name for a plugin class. Simply the fact of using Main shows a lack of knowledge and as such is a clear warning to not buy this code.

near crypt
#

okay i know what you mean

ivory sleet
#

A class named Main should only be one of a kind per application, in spigot we already have a class called Main

near crypt
#

yeah ik πŸ˜‰

#

it was just the way he wrote it

eternal oxide
#

I guess I could have written a paragraph detailing my reasoning, but anyone competent understood a single sentence.

near crypt
#

but does anyone know how can i send a player to a server in BC? i never used BungeeCord before sorry

eternal oxide
#

Plugin messaging channels

#

there is a specific message you can send to Bungee to transfer a player

near crypt
#

okay thanks

eternal oxide
#

You have a null object...

#

Main.java:46

#

Might be an idea to fix your package names then

#

package names are all lower case

#

classes are capitolized

#

Field and methods are camel case

#

Your humility is refreshing. It reminds me not to be an ass, thank you

steady rapids
#

is there any way to stop my server from doing this?
[16:49:07 WARN]: Excessive velocity set detected: tried to set velocity of entity #12045 to (-0.042823603858886006,1.8,-4.019945958770586).
[16:49:07 WARN]: java.lang.Exception: Stack trace
When I run&jump on a jumppad, this happens and my console is spammed with the above error. Is this something I can disable?
https://romano.eats.dog/HLvp9TbC

eternal oxide
#

Is there a reason you need such a large velocity vector?

steady rapids
#

for the fun of the players xd

#

so they can parkour around

eternal oxide
#

can you not make it smaller and still be fun?

steady rapids
#

yes but if I could keep it like this it would be better

willow oar
#

does anyone know how to destroy a door? when I try it always breaks only half of it

eternal oxide
#

cast to Bisected and get teh other half

#

break that too

night copper
#

Whats the difference between makinga plugin with Java 16 and lower Java versions, and what version should I use (for 1.16 plugin)

grim ice
#

NamespacedKey key1 = new NamespacedKey(Onceuncraftable.INSTANCE, "Skeleton");

    ShapedRecipe recipe1 = new ShapedRecipe(key1, new ItemStack(Material.SKELETON_SPAWN_EGG));
    recipe1.shape("BDB", "DSD", "BDB");

    recipe1.setIngredient('D', Material.DIAMOND);
    recipe1.setIngredient('B', Material.BONE_BLOCK);
    recipe1.setIngredient('S', Material.SKELETON_SKULL);

    Bukkit.addRecipe(recipe1);
#

will this work

#

@dusk flicker

#

sorry for ping

night copper
#

ye

eternal oxide
#

I can;t remember if Namespacedkeys accept upper case letters

night copper
#

it can't

quaint mantle
#

can i send sculk sensor's "sygnal" to the location?

#

1.17+

waxen barn
#

for 1.17 use java 16

#

for 1.16 java 8 or 11

night copper
#

oh

waxen barn
#

based on if you want newer features (java 11) or compactibility with older java

night copper
#

what are the features?

waxen barn
grim ice
#

NamespacedKey key1 = new NamespacedKey(Onceuncraftable.INSTANCE, "skeleton");

    ShapedRecipe recipe1 = new ShapedRecipe(key1, new ItemStack(Material.SKELETON_SPAWN_EGG));
    recipe1.shape("BDB", "DSD", "BDB");

    recipe1.setIngredient('D', Material.DIAMOND);
    recipe1.setIngredient('B', Material.BONE_BLOCK);
    recipe1.setIngredient('S', Material.SKELETON_SKULL);

    Bukkit.addRecipe(recipe1);
#

WHY ISNT THIS WORKING

#

anyone can help please

waxen barn
# night copper what are the features?

for java 16 it is for example, that instead of

if (commandSender instanceof Player) {
  Player plr = (Player) commandSender;
  //code
}

you can use

if (commandSender instanceof Player plr) {
  //code
}
#

so it is mostly, that you have some shorter syntax

night copper
#

ooh ok

night copper
#

the code*

grim ice
#

its onEnable

tame coral
#

do you have an error message ?

night copper
#

whats Onceuncraftable.INSTANCE

grim ice
grim ice
tame coral
#

replace Onceuncraftable.INSTANCE by this

grim ice
#

public final class Onceuncraftable extends JavaPlugin {
public static Onceuncraftable INSTANCE;
@Override
public void onEnable() {
INSTANCE = this;

}
    }
eternal oxide
#

if its in your onEnable just use this for your plugin instance

tame coral
#

if it's in your onEnable

grim ice
#

no its not in my main

waxen barn
# waxen barn for 1.16 java 8 or 11

but always use at least java 8, because it is required by spigot (older than 1.17), so it will run on every machine, that can run the server and it aded some great features as lambda expressions

grim ice
#

i have a different class

#

to not flood my main class

tame coral
#

What

grim ice
#

i have a different class on onEnable

#

so i dont flood my main class

tame coral
#

You can't have more than one JavaPlugin class

grim ice
#

bruh

#

im a total iidot

eternal oxide
#

I'm guessing he's calling a method in another class from his onEnable

grim ice
#

No

#

im a total idiot

eternal oxide
#

ok πŸ™‚

summer scroll
#

you don't call the method?

grim ice
#

i had two JavaPlugins

summer scroll
#

lol

grim ice
#

but what do i do??

tame coral
#

Keep one

#

And fuse the code

eternal oxide
#

only have one

grim ice
#

it has to be on OnEnable though

#

and ppl tell me to not flood my main class

tame coral
#

Yeah ?

#

Just put it

#

If it's the only solution then do it

eternal oxide
#

new recipeMaker(this)

grim ice
#

what

summer scroll
#

You can pass the main class instance to your other class, with that you can use methods from the main class.

grim ice
#

its prob like

#

Class.method

#

i think i heard that before

tame coral
#

No

summer scroll
#

No, that's static.

tame coral
#

It's litterally already in your code

grim ice
#

oh

summer scroll
#

?di

undone axleBOT
grim ice
#

oh god di

tame coral
#

public static Onceuncraftable INSTANCE;
@Override
public void onEnable() {
INSTANCE = this;

grim ice
#

ppl tell me that its pain

summer scroll
#

oh, he's already using singleton

unkempt ore
#

DI != DI framework

grim ice
#

but

#

what do i do then

#

Onceuncraftable.onEnable?

#

or what

summer scroll
#

eh wait

tame coral
grim ice
#

everything i have is public

#

Why would I need to use anything else in my case?

unkempt ore
#

Oh god

grim ice
#

hello

summer scroll
#

what is the current problem anyway?

#

i don't know what exactly the problem is

grim ice
#

the plugin doesnt work so i asked here

#

it seems the problem is

#

i have 2 JavaPlugins

tame coral
#

Yeah
Just keep one

grim ice
#

one in my main one in my other class so i dont flood main class

#

i dont wanna flood main class tho

summer scroll
#

so, just remove the other class that extends JavaPlugin

#

i mean remove the extends JavaPlugin

tame coral
#

And copy paste the code inside onEnable if you wish to keep it

grim ice
#

but i wanna use onEnable @summer scroll

summer scroll
grim ice
#

but

#

How?

grim ice
#

if i know how I wouldn't ask here

#

just keep that in mind so you dont have expectations

summer scroll
#

not like that

unkempt ore
#

No, don’t even do that

#

Do not extend JP more than once

tame coral
#

Just copy paste what's inside ???

#

Like

grim ice
#

breh

#

i dont think u understand my question

unkempt ore
#

Give the other class a method to be called on the main class’s onEnable

#

Don’t entirely extend JP again

grim ice
#

and what should it be'

summer scroll
#

Create the object of other class

unkempt ore
#

onEnable lmao

grim ice
#

what

tame coral
summer scroll
#

okay, show the whole class

grim ice
#

public class Recipes extends what?

summer scroll
#

the class that you extend JavaPlugin

summer scroll
#

both of them

grim ice
#

ok

#

this is Recipes class

summer scroll
#

?paste

undone axleBOT
unkempt ore
#

Oh hell nah

grim ice
#

OOPS SORRY ITS BIG

tame coral
grim ice
#

this is Recipes class

eternal oxide
#
  1. Create a RecipeManager Class.
  2. it has to have a constructor public RecipeManager(JavaPlugin plugin)
  3. Put your method/code in that class (not in the constructor) to add your recipe.
  4. in your Main add a Field private RecipeManager recipies = new RecipeManager(this)
  5. In onEnable call recipes.addRecipes()
grim ice
summer scroll
#

Okay, remove the extends JavaPlugin on the recipes class.

summer scroll
#

And create a method that return ShapedRecipe

tame coral
#

Just take this

grim ice
#

*spoonfeeding * i mean ty

tame coral
#

Don't forget the imports

#

I didn't include them

summer scroll
tame coral
#

Bruh

#

That's just dumb

summer scroll
#

It's smart

tame coral
#

It's overcomplicating the whole thing

summer scroll
#

It's good for long term

grim ice
#

ppl scream at me when i flood it

#

so i dont

unkempt ore
#

Well yeah, don’t

#

But do it properly when you don’t lmao

grim ice
#

im trying

tame coral
grim ice
#

its this specific thing

#

i cant figure out

unkempt ore
tame coral
#

Bruh, if you knew Java it wouldn't be a pain in the ass explaining it to you

summer scroll
#

instead public void, make it public ShapedRecipe

grim ice
#

okay

#

w h a t

#

why

summer scroll
#

Because you're gonna add the recipe on the onEnable.

#

Just like what ElgarL says, you will call the method on the main class.

#

or you can keep it like that, and call the method on the main class.

#

first of all create a constructor with your main class as the parameter

grim ice
#

okay

#

but

#

public class RecipesManager {

#

what should it extend / implement

eternal oxide
#

nothing

unkempt ore
#

You don't need anything's inheritance

#

It's sorta your own thing you're making

grim ice
#

Cannot resolve symbol 'setIngredient'

eternal oxide
#

imports

grim ice
#

no not that

#

it doesnt say import when i alt enter

eternal oxide
#

Cannot resolve means you are missing an import or you are using the wrong recipe type

grim ice
#

wait

#

public RecipesManager(JavaPlugin plugin){

#

what should be inside it

eternal oxide
#

this.plugin = plugin;

grim ice
#

this is in the RecipesManager class

#

Oka

#

y

eternal oxide
#

it will ask you to create a Field for plugin

grim ice
#

yes

#

and i did that

#

i still have 51 errors

#

lo;

#

cannot resolve

#

literally everything

#

lol

eternal oxide
#

?paste yoru class

undone axleBOT
grim ice
eternal oxide
#

your code is in the class, it needs to be in a method

grim ice
#

what method

eternal oxide
#

create one

grim ice
#

ok 1s

eternal oxide
grim ice
#

now?

eternal oxide
#

look at the link I did

#

you were close

grim ice
#

oh

eternal oxide
#

now change Onceuncraftable.INSTANCE to plugin

#

that class is now done

grim ice
#

done

#

ok

eternal oxide
#

just implement it in yoru onEnable

grim ice
#

and the class that has a JP?

#

i remove it

#

right

eternal oxide
#

jp?

grim ice
#

javaplugin

eternal oxide
#

no

grim ice
#

not main

#

the other class

eternal oxide
#

that is a local reference to yoru main class

grim ice
#

I KNOW

#

ok

#

i had 2 classes with java plugin

#

2 classes that extend java plugin

eternal oxide
#

no

grim ice
#

i remove the one that isnt main

#

right

eternal oxide
#

only main shoudl extend JP

grim ice
#

alr so i remove