#help-development

1 messages · Page 1590 of 1

unkempt ore
#

For the server, the item will look normal and be the real item

quiet ice
#
  1. Stop using "fake"
  2. "like" is ambigious
quaint mantle
#

Still does not make sense

unkempt ore
#

But he wants to middleman the packets and make it appear as something else

#

Yes it does lmao

#

He wants to make the item appear different to the client

#

But the server knows

quaint mantle
#

Gl with that if you’re sending a setSlot to a player the server updates off its data

quiet ice
#

Packet spam time babyyy

grim ice
#

OH

#

I GOT IT

unkempt ore
#

I’d imagine the library lets you simply intercept this

#

Each time it happens

grim ice
#

he meant a item that doesnt actually exist

#

like when u click it

quaint mantle
#

Then the server won’t interpret it?

#

At all

grim ice
#

it disappears

unkempt ore
#

Yes that’s…

grim ice
#

is that it

unkempt ore
#

That’s what he was saying

quiet ice
#

(or just use packet transformers - which are NMS)

grim ice
#

if what im saying is true then PacketPlayOutSetSlot will help

#

won't it

quaint mantle
#

No @unkempt ore you’re thinking so blatantly lol. You can’t just “intercept” the packet and cancel it

#

Then you will never get the item

#

Nor will the server

quiet ice
#

well, you can still modify it

unkempt ore
#

He wants it to appear as something else

waxen barn
unkempt ore
#

The item can still exist of course, right?

#

Just be modified when sent to the client

#

So it would appear different on the client side

unkempt ore
#

But the item itself would still exist to the server

#

In its real form

quaint mantle
#

Nope to update the item it requires another set slot. Which will update it for the server

grim ice
#

What he wants to do is to make a item that shows for the player but does not actually exist in the server

#

right?

unkempt ore
#

No

grim ice
#

then?..

quiet ice
#

stop doing assumptions

unkempt ore
#

It exists in the server, but shows up as something else in the client. I believe

waxen barn
grim ice
#

Oh

unkempt ore
#

Well, “fake item” is vague either way

grim ice
#

reversed

quiet ice
#

The asker is not responding so ...

grim ice
#

alright

unkempt ore
#

We should ask him

quaint mantle
#

Why would you ever want to do this

unkempt ore
#

We don’t ask that here lmao

quaint mantle
#

Let’s get the client and server out of sync

quiet ice
quaint mantle
#

Good idea

unkempt ore
grim ice
#

PacketPlayOutSetSlot

#

will probably do it

quaint mantle
#

Wdym?

unkempt ore
#

That’s the whole point of it isn’t it?

quaint mantle
#

Packet modding lol

hasty prawn
quiet ice
quaint mantle
#

@hasty prawn the server will still update it iirc

unkempt ore
#

The whole point is to allow to establish lies between the server and client

#

It brings you down a level of abstraction

#

Which is good for making intricate tricks

quiet ice
quaint mantle
#

And then what it updates for the server again

quiet ice
#

Do it again, until you want it to actually show the real item

unkempt ore
#

You need to maintain it if I had to guess

#

It’s your responsibility at that point, because you’re messing with the client directly

quaint mantle
#

Urgh I’m getting on and looking in client just to get a finalized answer

hasty prawn
#

Have you actually tried anything?

#

Or are you just assuming what we're saying won't work

quaint mantle
#

Yes I’ve messed with set slot packets, everytime the client receives a set slot. The server updates it accordingly

quiet ice
#

@round finch is the one that actually asked this question just to remind everyone. We are currently derailing this convo into a useless (dis-)agreement

exotic echo
#

Yo I'm having issues loading one of my plugins from another plugin

PluginA pluginA = (PluginA) this.getServer().getPluginManager().getPlugin("PluginA");

I get a java.lang.ClassCastException for some reason

grim ice
#

after some research i think u set the window byte to be 0 and set the short to be equal to the slot of the actually existing item u wanna replace, and then provide the item you which to replace with

quiet ice
#

Did you shade in pluginA in the plugin that is calling this line?

grim ice
quaint mantle
#

Don't you just love setting blocks async :ahegao:

#

@grim ice thats not the issue

#

the issue is when you call a set slot

quaint mantle
#

the server is already updating it based off the packet data passed through

#

yes

unkempt ore
#

What are you talking about

quaint mantle
#

Setting blocks asynchronously

#

@quaint mantle for what reason

#

Speed

quiet ice
#

then that is the issue because bukkit classloading is dum

unkempt ore
#

But..why would you do that

quiet ice
#

well, java classloading is always out there to just throw a brick at you

quaint mantle
#

Speed

waxen barn
unkempt ore
#

Isn’t there an issue with that and ticking?

quaint mantle
#

yep

quiet ice
quaint mantle
#

not a very good reason to make something async

unkempt ore
#

Is it threadsafe to change their data?

quaint mantle
#

But, if you do it with NMS and use playerChunkMap, since minecraft sends that every 1 tick, you can do it with literally 0 issues

#

Or atleast close to 0

#

Never encountered any issues yet

unkempt ore
#

Why is it so slow normally

quaint mantle
#

All the lighting updates and notifying

#

And just how it does it

unkempt ore
#

Setting blocks is what exactly?

#

Changing their block data?

quaint mantle
#
    /**
     * Handles pickin up an ItemStack or dropping one in your inventory or an open (non-creative) container
     */
    public void handleSetSlot(S2FPacketSetSlot packetIn) {
        PacketThreadUtil.checkThreadAndEnqueue(packetIn, this, this.gameController);
        EntityPlayer entityplayer = this.gameController.thePlayer;

        if (packetIn.func_149175_c() == -1) {
            entityplayer.inventory.setItemStack(packetIn.func_149174_e());
        } else {
            boolean flag = false;

            if (this.gameController.currentScreen instanceof GuiContainerCreative) {
                GuiContainerCreative guicontainercreative = (GuiContainerCreative) this.gameController.currentScreen;
                flag = guicontainercreative.getSelectedTabIndex() != CreativeTabs.tabInventory.getTabIndex();
            }

            if (packetIn.func_149175_c() == 0 && packetIn.func_149173_d() >= 36 && packetIn.func_149173_d() < 45) {
                ItemStack itemstack = entityplayer.inventoryContainer.getSlot(packetIn.func_149173_d()).getStack();

                if (packetIn.func_149174_e() != null && (itemstack == null || itemstack.stackSize < packetIn.func_149174_e().stackSize)) {
                    packetIn.func_149174_e().animationsToGo = 5;
                }

                entityplayer.inventoryContainer.putStackInSlot(packetIn.func_149173_d(), packetIn.func_149174_e());
            } else if (packetIn.func_149175_c() == entityplayer.openContainer.windowId && (packetIn.func_149175_c() != 0 || !flag)) {
                entityplayer.openContainer.putStackInSlot(packetIn.func_149173_d(), packetIn.func_149174_e());
            }
        }
    }```
#

gl with it

unkempt ore
#

Jesus christ

quaint mantle
#

How we do it? are you asking that?

scenic hornet
#

So I’m having trouble with making a help command, how do I make the help command?

quaint mantle
#

Chunk Sections

#

1.8 btw

quaint mantle
#

is the goal to make tons of block changes quickly?

#

Basically

#

its for a prison server

#

ah yes i see

#

for mines

#

Mines, Jackhammer, explosive

grim ice
#

hmmm

quaint mantle
#

Its sooo smooth

grim ice
#

so u wanna change a lot of blocks around u

#

?>

quaint mantle
#

have you tried using data palettes

#

1.8 as I said

#

i mean yea sections are quick

#

I've got the code

#

I was just saying imagine setting blocks async basically

#

I know, can be bad

#

have you tested it on the main thread

#

does it even cause issues?

scenic hornet
#

But how can I make a command? Like I looked it up but it’s confusing and I don’t want to have to learn Java

quaint mantle
#

It wouldn't cause issues on the main thread, its just deep into the NMS setting blocks directly in the chunk section

#

you dont really do something async until you see it causing issues and figure out why.

#

Its so fucking cool how it sends the update to the player though

#

I never heard of this method until earlier today

#

its not even the fastest 🙂

#

One of my friends made the code for the NMS

#

and sent me it

grim ice
#

uh

#

so

#

do u still have a problem

quaint mantle
#

I should have really talked about this in general

#

you didnt even write it lol

#

got me dead

#

LMFAO

#

Yeah yeah

unkempt ore
#

How do I even verify my account here again

quaint mantle
grim ice
#

holy fuck

#

@eternal oxide

#

it still doesnt show the recipe

#

if the player hasn't crafted the item yet

eternal oxide
#

have you set them as known?

grim ice
#

uh

#

how?

#

public void onJoinEvent(PlayerJoinEvent e){
e.getPlayer().discoverRecipe(recipes.getZombieKey());
e.getPlayer().discoverRecipe(recipes.getCreeperKey());
e.getPlayer().discoverRecipe(recipes.getSheepKey());
e.getPlayer().discoverRecipe(recipes.getSkeletonKey());
e.getPlayer().discoverRecipe(recipes.getEndermanKey());
e.getPlayer().discoverRecipe(recipes.getSlimeKey());
e.getPlayer().discoverRecipe(recipes.getPhantomKey());
e.getPlayer().discoverRecipe(recipes.getEvokerKey());
e.getPlayer().discoverRecipe(recipes.getSquidKey());
e.getPlayer().discoverRecipe(recipes.getSpawnerKey());
e.getPlayer().discoverRecipe(recipes.getWitherKey());
e.getPlayer().discoverRecipe(recipes.getVindicatorKey());
e.getPlayer().discoverRecipe(recipes.getShulkerKey());

#

this is my onJoin event

eternal oxide
#

do you know if that code is running?

grim ice
#

i mean

#

it should run

#

why won't it

eternal oxide
#

is it annotated Eventhandler?

grim ice
#

oh fuck me

eternal oxide
#

😄

grim ice
#

i always forget

#

why doesnt intelliJ remind

#

i mean its my stupidity but

#

he says unnecessary warnings but ignores that

grim ice
#

do u think it will work

eternal oxide
#

perhaps

grim ice
#

i found in google that i have to give the player

#

a knowledge book

#

like that

#

ItemStack is = new ItemStack(Material.KNOWLEDGE_BOOK,1);
KnowledgeBookMeta bm = (KnowledgeBookMeta) is.getItemMeta();
bm.addRecipe(name_tagRecipe);

is.setItemMeta(bm);

eternal oxide
#

no idea, I've never doen it

grim ice
#

o

hasty prawn
#

How's IntelliJ supposed to know that method won't fire if the annotation isn't there 😢

grim ice
#

dunno

#

ok it worked

#

poggggggggggggggggggggggggggggggggggggggggggggggggg

eternal oxide
#

did you have to create and give the book?

grim ice
#

No

#

sorry for late response

#

i had intelliJ open and didnt check discord

quaint mantle
#

So... is setting blocks asynchronously a good or bad idea... with NMS [1.8.8], a friend of mine made something to allow you to set block asynchronously and smoothly, is it a bad idea to use it?

#

Hi does anyone know why my interactive chat sends a weird <chat = my minecraft id> after every msg instead of working?

ivory sleet
#

afaik it will be caught and then an error will be thrown

eternal oxide
grim ice
#

Sure

eternal oxide
#

?paste

undone axleBOT
eternal oxide
grim ice
#

what a disappointment

#

nothing different?

eternal oxide
#

that does all yours does, including discovering the recipies and you only need .registerEvents(new RecipesManager(this), this); in your main

grim ice
#

wait

#

nvm

#

it makes it way shorter

eternal oxide
#

You also don;t need to pass an instance of teh RecipiesManager

grim ice
#

e

#

u think dis will work?

eternal oxide
#

you cna use RecipiesManager.CREEPER.getKey()

grim ice
#

honestly

eternal oxide
#

in any other class

grim ice
#

what i used is waaaaaaaaaaaaaaaaaaay simpler

#

even if it takes space im prob sticking with it

hasty prawn
#

The way Minecraft implements recipes is so interesting

eternal oxide
#

You will enjoy enums once you get used to them. Less code and a lot more features

grim ice
#

ill try to understand the code you sent me

eternal oxide
#

Please do. Its a lot better than the code you have. But don;t jump to it until you understand it.

quaint mantle
#

Hello. My plugin.yml file doesn't seem to be working properly. All of my commands work, but as soon as I add permissions, it doesn't autofill on client side (where you can press tab to complete the command). Command still works tho.

grim ice
#

yeah

scenic lance
#

how do i remove a row of slots in a chest (menu)?

quaint mantle
#

ChunkSection + playerChunkMap (sync for block updates)

hybrid spoke
#

not sure if this will work. it will collide with the main thread since world manipulation have to be done synced.

quaint mantle
#

It Shockingly works, its smooth, but not sure if it would cause any issues

ivory sleet
#

What version are you on btw?

quaint mantle
#

sooo

ivory sleet
#

Oh right that’s why

#

No async catcher there

quaint mantle
#

There is 🙂

ivory sleet
#

Not for that probably

quaint mantle
#

Ah

scenic lance
quaint mantle
#
    public void setBlock(Object chunkHandle, int blockX, int blockY, int blockZ, int combinedId) {
        IBlockData data = Block.getByCombinedId(combinedId);
        net.minecraft.server.v1_8_R3.Chunk nmsChunk = (net.minecraft.server.v1_8_R3.Chunk) chunkHandle;

        int indexY = blockY >> 4;
        ChunkSection chunkSection = nmsChunk.getSections()[indexY];

        if (chunkSection == null)
            chunkSection =
                    nmsChunk.getSections()[indexY] =
                            new ChunkSection(indexY << 4, !nmsChunk.world.worldProvider.o());
        chunkSection.setType(blockX & 15, blockY & 15, blockZ & 15, data);

        ((net.minecraft.server.v1_8_R3.Chunk) chunkHandle).e();
    }```
#

thats how its done..

ivory sleet
#

And setBlock is called async then?

quaint mantle
#

Yep

hybrid spoke
quaint mantle
#

    @EventHandler
    public void onBreak(BlockBreakEvent event) {

        BLOCK_BREAK_ACCEPT_SERVICE.submit(
                () -> {```
#

thats how its called async ^

#

Its a prison enchants core

#

soo

ivory sleet
#

Alrighty

quaint mantle
#

But yeah, was just wondering if it would cause any issues

scenic lance
#

😩😩

quaint mantle
#

if not then great

ivory sleet
#

Doesn’t seem like it causes any issues rn

#

But it probably isn’t thread safe in the long run

quaint mantle
#

Sick

#

yea

hybrid spoke
#

as i said it might collide with the main thread

quaint mantle
#

yea

#

Alright, thanks guys! ❤️

#

I still need md5 to give me the verified role.... fuck me

unkempt ore
#

@eternal oxide I'm making a report. I don't need to include a reproduction plugin do I? It's way too simple

quaint mantle
#

@hybrid spoke The human person doesn't know how to even code

#

I told them to learn java then the spigot api for you

eternal oxide
unkempt ore
#

ProjectileLaunchEvent would work, I'm sure of that

#

But the issue is that PlayerEggThrowEvent fires when the egg hits the surface

#

And I'm pissed about it

eternal oxide
#

ah I handle it slightly differently. I was makign spawn eggs throwable

#

?paste

undone axleBOT
eternal oxide
hybrid spoke
eternal oxide
#

I can test that real quick

hybrid spoke
quaint mantle
#

The human person you replied to with "for loop"

hybrid spoke
#

ahhhhhhhhhhhhhh

eternal oxide
#

Starting a server now

eternal oxide
#

I wonder if its just named really badly

hasty prawn
#

That seems like a useless event anyways

#

ProjectileHitEvent and ProjectileLaunchEvent cover both of those anyways, so why did we need a specific one for eggs 😕

eternal oxide
#

I guess just to manage spawning

hasty prawn
#

Oh, yeah it's for hatching

#

Probably EggHatchEvent would be a better name for that ngl

eternal oxide
unkempt ore
eternal oxide
#

and yes ProjectileLaunchEvent triggers for throwing an egg.

unkempt ore
#

Yes it does

#

But I want setHatching

eternal oxide
#

thats only for impact

unkempt ore
#

How should I make sure a chicken doesn’t come out

#

Guess I could have another handler for it

young knoll
#

Just use setHatching?

unkempt ore
#

But that’s kinda..meh

young knoll
#

A chicken isn't going to come out before impact

unkempt ore
#

setHatching is a method of the egg throw

eternal oxide
#

set your PDC in ProjectileLaunchEvent then monitor in PlayerEggThrowEvent

unkempt ore
#

Yeah I’ll do that

#

I’m pissed I wasted this much time over such a terribly named event

eternal oxide
#

I guess that why I never used it. I went staright to snowballs

#

I remember I did try the egg throw but it seemed to not work

#

now I know why

#

its EggHitEvent not throw

#

or EggHatchEvent

#

I know I've named some really bad methods before too.

glass mica
#

Do you guys recommend XSeries?

proud basin
#

xbox?

glass mica
proud basin
#

or do you mean like the xmaterial

glass mica
#

ye

proud basin
#

ah

glass mica
#

I use XSound

ivory sleet
#

It’s almost useless

unkempt ore
#

But the egg throw event fires when it hits

eternal oxide
#

well yes, the event that says its throw

unkempt ore
#

Ah

muted idol
#

hey there how would i go about adding a jsonobject to a jsonarray with gson?

unkempt ore
#

Pretty sure you can literally just add it, can’t you

granite stirrup
#

apparently how citizens does npc look is using 3 armor stands

muted idol
# unkempt ore Pretty sure you can literally just add it, can’t you

tried that (jArray.add(new Test(1, "test")); but it says that i need to convert it to a string but if i convert it to a string and then try to write the json array to my json file it will ask to make my json array into a string so that i can then write it but if i do that then i will get a bunch of slashes in my code

waxen barn
#

?

eternal oxide
muted idol
#

hey there so with this code im just checking if the appending works

                    JsonElement openCheckpoints = new Gson().fromJson(new FileReader(mainClass.CheckpointsFile), JsonElement.class);
                    JsonArray checkpointsAry = openCheckpoints.getAsJsonArray();
                    RegisterCheckpoints RegisterCheckpoints = new RegisterCheckpoints(counter, p.getLocation().getBlockX());

                    checkpointsAry.add(new Gson().toJson(RegisterCheckpoints));
                    System.out.println(checkpointsAry);
``` and the output of RegisterCheckpoints is ` {"ID":16,"X":1899}` which is correct but the output of the checkpointsAry.add(RegisterCheckpoints) is `[{"ID":1,"X":1849},"{\"ID\":16,\"X\":1899}"]` so the adding of the obj to the array is whats causing the issue
if i try to remove `new Gson().toJson` from the line which adds the obj to the array then it tells me to wrap it into a string.valueOf
waxen barn
waxen barn
#

the cmd throws still the same error

#

event when i use the same command in both command lines

eternal oxide
#

are you in the correct folder when you run the commands?

waxen barn
# eternal oxide are you in the correct folder when you run the commands?

yep, the folder is same in the bash (working) and cmd (not working)
and btw the command is

java -cp $HOME/.m2/repository/net/md-5/SpecialSource/1.10.0/SpecialSource-1.10.0-shaded.jar:$HOME/.m2/repository/org/spigotmc/spigot/1.17-R0.1-SNAPSHOT/spigot-1.17-R0.1-SNAPSHOT-remapped-mojang.jar net.md_5.specialsource.SpecialSource --live -i TridentGamesPlugin.jar -o TridentGamesPlugin-obf.jar -m $HOME/.m2/repository/org/spigotmc/minecraft-server/1.17.1-R0.1-SNAPSHOT/minecraft-server-1.17.1-R0.1-SNAPSHOT-maps-mojang.txt --reverse

so this error shouldn't be based on where I execute it

eternal oxide
#

afraid no clue then. I've not used that at all.

waxen barn
#

the only problem, that I can see is, that cmd can interpret $HOME in different way than bash

#

but idk if it is true

eternal oxide
#

use teh full path then

waxen barn
#

i tried, but that doesn't work even in the bash

eternal oxide
#

or %USERPROFILE%

waxen barn
#

and when I tried cd %USERPROFILE% it didn't anything, but idk if this is correct or not

eternal oxide
#

try %HOMEPATH%

#

both work for me in explorer

eternal oxide
#

works in command prompt too

muted idol
#

yo @eternal oxide do you think you could help me with my issue?

quaint mantle
eternal oxide
waxen barn
#

and I was on T

eternal oxide
#

Yes, I'm askign if the actual string output to file is escaped

muted idol
#

this is what im getting in the console with my current code

#

thats my json output

eternal oxide
#

try JSON.stringify(obj)

mental girder
#

you are writing a string, and the special characters in that string are being escaped

muted idol
eternal oxide
#

where you add

muted idol
#

give me a sec

muted idol
#

found toString()

#

though

paper viper
#

thats different

#

also i never heard of JSON.stringify

muted idol
#

yea me too

#

though it does exist in javascript

#

fixed it!

muted idol
eternal oxide
#

You could also have used a Gson builder

#

Then you could disable escaping

round finch
waxen barn
#

btw, I have another problem, that when I remap my plugin form mapping-mojang to mapping-obf, paper still can't load it because it want's spigot mapping, how to solve it?

heavy void
#

Hey, im making a bedwars plugin, i want to know, why my fireball isnt breaking blocks? (It isnt a event cancelling)

mental girder
#

it's a sissy ass fireball

#

tell it to be a real man

#

and explode properly

dusk flicker
#

Do fireballs break items by default? Honestly don't know

heavy void
#

Im using launchProjectile

waxen barn
mental girder
#

ghast fireballs do

dusk flicker
mental girder
#

the other fireballs don't

waxen barn
heavy void
mental girder
#

are you sure you're firing a ghast fireball

#

and not the fireball that blazes shoot

heavy void
#

Im launching a Fireball.class projectile

mental girder
#

are those the same internally? I don't remember

#

if they are, check the javadocs on Fireball and see if there's anything about explosions there

heavy void
#

Ill try use GhastFireball

#

or something close.

mental girder
#

search the javadocs for Fireball and see if there are other types of fireball

round finch
#

All Known Subinterfaces:
DragonFireball, LargeFireball, SizedFireball, SmallFireball

dusk flicker
#

Delete that

#

put it in a paste

#

?paste

undone axleBOT
ancient roost
#

This chunk of code is looping causing the chat to get filled with the same 3 lines of text when its only supposed to be typed once. I have pinned it down to the runTaskLater runnables and i am here to ask if anyone can help resolve this issue
https://paste.md-5.net/ivuposofax.cs

dusk flicker
#

?scheduling

undone axleBOT
unreal quartz
#

you never increment progress

ancient roost
unreal quartz
#

copy it into a field then ++

#

you won't be able to increment a local variable inside a runnable since they must be final

ancient roost
#

i dont understand

unreal quartz
#

and i'd also suggest rethinking your architecture before you want to shoot yourself trying to maintain this code

dusk flicker
#

Try LargeFireball

heavy void
#

Ill send my code, wait

dusk flicker
unreal quartz
#

that's per tick

#

not millisecond

dusk flicker
#

Hmm I thought that was a ms value

unreal quartz
#

no

mental girder
#

the scheduler works with ticks

ancient roost
#

now im really confused

mental girder
#

learn java

unreal quartz
#

?learnjava

undone axleBOT
heavy void
round finch
#

20 ticks is nearly one sec

heavy void
#

Evt is the PlayerInteract event.

unreal quartz
#

try setting the yield to a value above 0

round finch
#

always remeber to @Eventhandler

#

and registerevent class

#

just a note

heavy void
#

It has @EventHandler

#

ill send all my code

#

All my problem is my fireball dont breaking blocks ..

waxen barn
unreal quartz
heavy void
#

hm

#

ok

#

wait

round finch
#

try LargeFireball.class?😅

#

if that is right i'm on mobil
wish u luck

runic cloud
#

Hello,
I want to create trades plugin, but I have a problem with inventories. I cancel the InventoryClickEvent when player tries to put item on wrong side (which has red background), but sometimes it doesn't cancel the event, especially when I right-click the slot with item on cursor (but sometimes it's enough just to spam left-click).
https://im3.ezgif.com/tmp/ezgif-3-e0d0aedb67b0.gif

unreal quartz
#

nice gif

regal cedar
#

A little test cuz I am new to java

#

It is not running

unreal quartz
#

well obviously

#

you didn't register it

regal cedar
#

What's that mean?

unreal quartz
clear galleon
unreal quartz
#

and that if statement wont work btw

regal cedar
#

Ohh

unreal quartz
#

you still need to register it

regal cedar
#

Okok

#

And I see...you made a quest plugin?

unreal quartz
#

might have

regal cedar
#

I use that lol
Love it so much

regal cedar
#

Thanks!

quaint mantle
#

Anyone knows what is causing me to get kicked every time i do [item] with empty hand? (interactive chat)

unkempt ore
#

How do I play a "pop" sound?

#

What sample is that?

#

Lava pop?

tacit storm
clear galleon
unkempt ore
#

Thanks

#

What was that utility that let you see what blocks were touched by a line between two points?

runic cloud
unkempt ore
#

I think I found it

#

BlockIterator

regal cedar
#

How to use variable?
On players?

unkempt ore
#

What...

regal cedar
#

Most likely letting everyplayer have their own var

unkempt ore
#

What do you mean a variable

regal cedar
#

After I picked up a coal,I got 1 point in a variable

#

But other player wont get it

#

like that

tacit storm
#

You mean a List ?

unkempt ore
#

Hmmm, no

#

I think he means something like a per-player point system sort of thing

regal cedar
#

No,not a list
maybe same as minecraft scorebroad

unkempt ore
#

You'll probably want to use the persistent data container of the player to keep the memory of these "points"

#

And then when they do something that would merit changing the point values, you just handle events accordingly

regal cedar
#

Yes

#

But how?

unkempt ore
#

So, Players have a getPersistentDataContainer method

#

I recommend looking up how to use the PersistentDataContainer API

#

You'll need it with something like this

quaint mantle
#

Hello. My plugin.yml file doesn't seem to be working properly. All of my commands work, but as soon as I add permissions, it doesn't autofill on client side (where you can press tab to complete the command). Command still works tho.

silk mirage
unkempt ore
#

It's just so perfect

silk mirage
#

he must be using old intellij idea too, otherwise idea would have said that its wrong

unkempt ore
#

What? No

#

That is legal syntax in Java

unreal quartz
unkempt ore
#

How could I get all blocks that are intercepted by a line between two location points?

#

I'm sure if has to do with a BlockIterator, just not sure how to go about doing that specifically

silk mirage
#

use distance formula

unkempt ore
#

I know the distance formula

#

That is not what I need lmao

urban trout
hidden delta
quaint mantle
#

(I can't find any other apis without using protocllib)

hasty prawn
quaint mantle
#

Hmm, what's problem with that api?

#

maybe not injected?

#

and I don't want to use protcollib sorry

bright jasper
#

This looks right right?

    tasks.processResources {
        filesMatching("plugin.yml") {
            expand("plugin.yml": project.version)
        }
    }
}
hasty prawn
quaint mantle
quaint mantle
#

and on 1.15.2

bright jasper
#

Im asking for help not giving help

quaint mantle
#

oof xD

hasty prawn
#

You can probably modify the imports to work with 1.15.2

quaint mantle
#

and no errors in compile and console

#

(no any errors)

shut field
#

anyone know what is wrong here?

clear galleon
shut field
clear galleon
#

where are you trying to get serialized object from

shut field
#

idk

clear galleon
#

wdym you dont know

#

what the hell is a serialized object

#

like what are you using it for

shut field
clear galleon
#

serializedobject isnt in java

shut field
#

OH MY GOD IM AN IDIOT

quaint mantle
#

Yesy

clear galleon
#

lmao i searched it up its a unity thing haha

shut field
clear galleon
#

o

shut field
#

and there class name is SerializedObject

#

.

#

and no, I did not just copy paste it, but I didn't realize I was supposed to replace that with my class name

quaint mantle
#

Hello. My plugin.yml file doesn't seem to be working properly. All of my commands work, but as soon as I add permissions, it doesn't autofill on client side (where you can press tab to complete the command). Command still works tho.

#

.

dusk flicker
#

You need that permission to tab-complete it afaik

cobalt comet
#

so I'm trying to figure out using mojang nms mappings (specficially reobfusacting mojang mapped plugins) and have a few questions. 1) I understand a mojang mapped jar can't run on a spigot mapped server, but can a dev mapped jar run on a spigot mapped server? and is mapping a mojang mapped jar to spigot a two step process (map to dev, then map to spigot)? 2) can all the mapping be done within maven, or do I need to have a script and run the extenal SpecialSource jar to map?

stark hawk
#

Good Afternoon,

I have a server I wish to launch in the near future with a list of plugins I wish to be set up and configured to work along side each other. I work a very intensive work schedule therefore I dont have the time to digest and configure the server settings my self.

Current Server Plugins:

-EssentialsX,
-Factions,
-McMMO,
-Gringotts,
-Rankup,
-WorldGuard/Edit,
-Vault,
-LuckPerms,
-Infernal Mobs,
-plus a few QoL plugins.

What I request: To have a skilled individual configure my settings so that players can accumulate in game currency via Essentials, McMMO, and Gringotts, and purchase ranks via the RankUp plugin.

I understand this task may be tedious, so I encourage anyone who is willing to take on the project to add my discord (at the bottom) so we can discuss and come to an understanding of what I hope to see but as well as compensation as I understand things such as this can take time.

Thanks z_Sand0r

Discord: Sandor#2396

cobalt comet
#
  1. if I have a multi module maven project, (each nms version has its own module), can I remap the modules before they're shaded into my main jar? or should I only remap the final jar
undone axleBOT
quaint mantle
stark hawk
dusk flicker
#

as I mentioned above, use services; Not this channel

#

?services

undone axleBOT
quaint mantle
#

Jw If you’re offering up front payment or server profit

stark hawk
#

@dusk flicker will do first time lurker sorry 🙂

halcyon bridge
#

I've used Mojangs mappings to use NMS within this plugin but i still can't compile for some reason. Does anybody knows what's the issue here?

<plugin>
    <groupId>net.md-5</groupId>
    <artifactId>specialsource-maven-plugin</artifactId>
    <version>1.2.2</version>
    <executions>
        <execution>
            <phase>package</phase>
            <goals>
                <goal>remap</goal>
            </goals>
            <id>remap-obf</id>
            <configuration>
                <srgIn>org.spigotmc:minecraft-server:1.17-R0.1-SNAPSHOT:txt:maps-mojang</srgIn>
                <reverse>true</reverse>
                <remappedDependencies>org.spigotmc:spigot:1.17-R0.1-SNAPSHOT:jar:remapped-mojang</remappedDependencies>
                <remappedArtifactAttached>true</remappedArtifactAttached>
                <remappedClassifierName>remapped-obf</remappedClassifierName>
            </configuration>
        </execution>
        <execution>
            <phase>package</phase>
            <goals>
                <goal>remap</goal>
            </goals>
            <id>remap-spigot</id>
            <configuration>
                <inputFile>${project.build.directory}/${project.artifactId}-${project.version}-remapped-obf.jar</inputFile>
                <srgIn>org.spigotmc:minecraft-server:1.17-R0.1-SNAPSHOT:csrg:maps-spigot</srgIn>
                <remappedDependencies>org.spigotmc:spigot:1.17-R0.1-SNAPSHOT:jar:remapped-obf</remappedDependencies>
            </configuration>
        </execution>
    </executions>
</plugin>
hasty prawn
halcyon bridge
cobalt comet
hasty prawn
# halcyon bridge http://prntscr.com/1emhzi4

I'm not too proficient in Maven, but it seems like for some reason Maven cached something & is now preventing the JAR from being downloaded. Is there a way you can either

  1. Add your local maven repo to the pom.xml, and then build Spigot using --remapped to get the JARs from there
  2. Clear your Maven cache and see if it'll get the JARs properly from the repositories
halcyon bridge
opal sluice
#

hi, has someone already tried to create a hitbox creator/manager/engine plugin ?

shut field
#

how would I do this in a static method

hasty prawn
#

Do what

shut field
#

return (Z) this;

hasty prawn
#

You can't use this in a static method

shut field
#

but I can't use "this" in a static method

#

what do I replace "this" with?

hasty prawn
#

You can't reference an instance within a static method, you have to pass it in or something

shut field
#

hmmm

ornate hollow
#

So ive been using the spark + jackson so far for all my server api needs. The issue is i only had status and player vault balance available. I want to change to packets, but people tell me they are really bad for big servers, i mean it cant be worse then having a Jetty web server running in the plugin. Should i do the switch to netty packets or leave the jetty server. Packets will allow me to use TCP Shield much more effectivly, compleatly covering up my ip, now you can get it with a api.xx.xx

valid solstice
#

I was wondering how those auto restart timers work in servers. how do they access the start.sh of a server if the server is offline and plugin is not enabled at that time?

rigid otter
#

Anyone know about mongodb? I ask here because of using it with spigot.

#

Its connection(MongoClient) always auto close, can I leave it open for getting data faster than reconnect to get data?

near crypt
#

?paste

undone axleBOT
near crypt
hasty prawn
#

You can, just putting num on a line isn't a statement

near crypt
#

ik but when i type for example switch(num) it also wont work wait

#

like this

#

it just says that i should create an getter and setter but i dont want it

#

@hasty prawn

hardy swan
#

Switch is a method

near crypt
#

ik

#

switch()

hasty prawn
#

Send the full code that you're trying

hardy swan
#

switch works on strings

#

no other types

hasty prawn
#

It works on ints

#

And enums

hardy swan
#

oh wat

near crypt
#

@hasty prawn this is the full class this is the broken part about it...

hasty prawn
#

Oh, it's cause you're not in a method

#

That's why it's suggesting the getters and setters

hardy swan
#

he say he tried switch()

near crypt
#

yes

hasty prawn
#

That's something to be used inside a method not as a method

near crypt
#

okay it works but why is it like this?

hasty prawn
#

public void stuff() {
switch(num) {
case 5: //etc
}
}

near crypt
#

why cant i just use this variable everywhere?

hasty prawn
#

You can, provided it's public, but you still have to be in a method

#

?learnjava

undone axleBOT
near crypt
#

i learned java but iam just lost right now haha

#

xD

#

but thanks @hasty prawn 😉

hardy swan
granite stirrup
#

very different commands

#

also have pdeop

#

pop ops you on one world

#

source code is in skriPt because im on minehut which hasnt got custom plugins yet and im lazy to make a plugin

manic crater
#

wat r u doing..

#

no dont tell me ur making a mc server host in minehut...

#

:/

granite stirrup
#

cuz im bored

manic crater
#

ugh,

#

i dont think u understand how terribly thats gonna work out...

#

like... the server is gonna either crash or be super laggy....

#

:/

granite stirrup
#

its gonna be fine

manic crater
#

No it isnt

#

valknet

#

mc server host provider in minehut

#

literally mh unlimited.

#

crashes , lags

#

etc

granite stirrup
#

the server hasnt crash yet lmao

manic crater
#

key word YET

#

its gonna crash eventually...

granite stirrup
#

nah

manic crater
#

and if u dont want it 2... ur gonna have to hardcore hard code it....

granite stirrup
#

i already have a few bits done hasnt lagged yet or crashed but we did only have 1-2 players

#

since im doing it with my friend

manic crater
#

well....

#

gl trying to make it not die...

#

:/

#

u best have a super secure world management system tbh.... :/

granite stirrup
#

like what?

manic crater
#

well since on minehut u cant upload plugins,

#

ur gonna have to figure it out

#

Skript is over all trash af tbh

#

soo.... gl..

granite stirrup
#

currently im just using mutliverse lmao

drowsy helm
#

theyre planning on adding plugin support

manic crater
#

yk the day when that happens..

granite stirrup
#

ik but thats ages away

manic crater
#

is the day i might use minehut again

manic crater
drowsy helm
#

problem is people can upload plugins that effect the proxy since all servers are connected

manic crater
#

yeah

#

but the thing is,

#

thats IF they allow bungee plugins

#

which is unlikely

#

considering how u have to upload mainly the bungee plugins to the proxy folder,

#

but bungee spigot is just a spigot plugin with bungee support.

drowsy helm
#

theyre developing technology that will isolate serves and not allow plugins to mess with that stuff

#

as we speak

manic crater
#

eh

#

did they make that giant announcement yet?

#

cuz they said they were gonna

drowsy helm
#

nope

#

was talkign to their lead dev about it

manic crater
#

o

granite stirrup
#

all i know is trent told me they started working on it a couple of months ago

#

or weeks

#

idk

#

cant remember

manic crater
#

dude tf u mean

#

they did announce their big update

#

mh unleashed

drowsy helm
#

oh maybe they did lol

manic crater
#

thats what its called,

drowsy helm
#

i dont keep track of it

granite stirrup
#

oh yeah

#

i saw that

manic crater
#

yk if minehut unleashed is good

#

ill use minehut again no doubt.

#

but if its trash than no im fr never using minehut again until its good

granite stirrup
#

the only problem is minehut does crash alot tho lol

drowsy helm
#

well if youre using a free host expect limitations lol

granite stirrup
#

ik

granite stirrup
#

but i feel like they the first free host to crash this much

#

its like a world record

manic crater
#

but im talking about they best be letting me upload like over 1 mb worth of jar files. xd

manic crater
drowsy helm
#

probably will be a paywall limit

manic crater
#

wdym "paywall limit"

#

i doubt they would make u pay for a plan for uploading plugins

#

i think that would fr be super unfair if they did

drowsy helm
#

like you ahve to pay xx to get 10mb etc

manic crater
#

well thats bs if they do

drowsy helm
#

? how

manic crater
#

and than ppl would just complain even more

manic crater
drowsy helm
#

or a plugin limit or something

#

its a free service

manic crater
#

being able to only upload 10 mb worth of plugins

#

thats just stupid

manic crater
drowsy helm
#

its an example

manic crater
#

cuz at least than i could put everything into one plugin

granite stirrup
drowsy helm
#

and having high player count is still no reason for crashing lol

#

just means they need better infrastructure

manic crater
#

but im talking about like if we were allowed to upload plugins, than make a plugin limit for individual plugins

#

id be fine with that, considering how i can just put everything into one plugin

manic crater
#

hypixel is over all laggy... soo...

#

kind of just stating.... minehut is kind of the superior one out of the two atm...

drowsy helm
#

but minehut is better equipped for scalability

#

they use kubernetes

#

i hthink hypixel does manual deployment

opal juniper
#

Umm, I don’t think that because hypixel does it themselves that it is worse

#

Their servers are spun up / down automatically

#

But I would presume they wrote their own tool

grim ice
#

Is minehut worth using

quaint mantle
#

no lol

#

heyhey

#

idk why this is happening

#

i have JDABuilder imported

#

theres no errors, no warnings

stone sinew
# quaint mantle

Importing doesn't mean its available... You either have to be running JDA or it has to be shaded.

quaint mantle
#

if it wasnt available there'd be errors

quaint mantle
stone sinew
quaint mantle
#

considering its a referenced library

#

unless referenced libraries dont work that way, and im an idiot

#

and if the ydont work that way, i have no clue how to import JDA any other way

#

because im using eclipse

#

hi im on 2 hours of sleep, sorry that sounded aggressive

stone sinew
#

You need to shade it if you aren't depending on another plugin that runs it.

quaint mantle
#

ahhh

#

sorry to ask this, how do i shade it

stone sinew
quaint mantle
#

cant i just.. /make/ a gradle file

stone sinew
quaint mantle
#

thanks

#

like thank u a ton

#

i dont think u realize how much that actually helped me LOL

near crypt
#

are there still people who code for mc 1.8?

quaint mantle
#

thats a funny question

#

duh

stone sinew
quaint mantle
#

theres people that still do stuff in 1.7 lol

near crypt
#

xDDDD

#

LMAO

quaint mantle
#

yes

#

much LMAO, such xD

#

all in the development-help channel

near crypt
#

@stone sinew why do you code in 1. fucking 8?

stone sinew
#

My main plugin supports 1.8.8 up to 1.17

near crypt
#

but you dont code just for 1.8?

quaint mantle
#

woah

#

man sir

#

mr man

stone sinew
#

I mean its base code is all 1.8 except for checking the hand lol

quaint mantle
#

mr mansir friendo

stone sinew
#

All my new plugins are 1.16+ except for Minions-Revamped thats 1.16.5 down to 1.8.8

quaint mantle
quaint mantle
#

just use spigot's shade task

#

im gonna sleep

#

oh

#

whats that

#

let me google that

#

then i'll sleep

#

and continnue where i left off!

#

looks more like a question

#

uh

#

no

#

oh is that a maven thing

#

are you using maven

#

no im about to install it

#

nvm ur probably not even using a dependency manager

quaint mantle
#

well your entire project has to be a maven project

#

idk if you can change that now

#

yeah i'll find a way lol

stone sinew
quaint mantle
#

or that too

#

Oh

#

i was just gonna remake the project and copy/paste everything

#

but that works too

#

Idk i'm on intellij, the superior ide

#

¯_(ツ)_/¯

craggy cosmosBOT
quaint mantle
#

Dyno's gonna keep thinking lol

#

he'll never stop

stone sinew
quaint mantle
#

such as

#

idrk about IDEs, but eclipse seems to get the job done lol

#

tbh IntelliJ just seems to be fancy

#

like a cessna compared to a 747

stone sinew
# quaint mantle such as

Constant errors on maven building.
The imports are always fucked up.
These were my main gave up on trying to use it after a week.

quaint mantle
#

sounds like more of a java version error then anything else

stone sinew
#

Also any time I see someone code using Intellij I always see constant errors getting spammed and they have to restart their IDE xD

quaint mantle
#

again I haven't had those problems

stone sinew
quaint mantle
#

Been using it for a solid 3 years

stone sinew
quaint mantle
#

unzipisnt a command

#

im gonna cry

stone sinew
quaint mantle
#

i failed to read teh proper instructions

stone sinew
quaint mantle
#

why is this so confusing to me

#

I just prefer Intellij's look, feel and code suggestions

#

as well as coming with tons of useful features out of the box

stone sinew
quaint mantle
#

yeah

#

Yeah I guess it's not as intuitive there

#

its like actually comfortable chairs in airplanes

#

no1 really uses them, but the plane doesnt have them >:(

stone sinew
quaint mantle
#

: o

#

The installation of Apache Maven is a simple process of extracting the archive and adding the bin folder with the mvn command to the PATH.

#

No doubt about that

#

wheres the PATH

#

there is no PATH

quaint mantle
#

idek what you're doing at this point

#

I never did any of that shit

quaint mantle
#

For maven anyway

#

weird flex but ok

quaint mantle
#

not a flex

#

i extract the

#

if you go to new project does it have a maven option?

#

no lol

stone sinew
quaint mantle
#

do i not have JDK installed

#

istg i just downloaded it?

#

did you download it or also install it

stone sinew
quaint mantle
#

i dont get anything when i searched

stone sinew
amber vale
#

Anyone got experience working around with bungeeapi + townyapi to make me a simple death plugin thing

quaint mantle
#

ahhhhhhhh

#

i see

#

i was searching in English

#

so it goes to the Java directoryyy

#

oh or eclipse

#

java or eclipse

#

i dont have a JAVA_HOME one

quaint mantle
#

odd i have everything for Maven installed into Eclipse

#

from the marketplace

#

"market"

eternal oxide
#

What is your issue

quaint mantle
#

idk if i have maven or not

#

i dont have it installed onto my PC, right

eternal oxide
#

What build of Eclipse?

opal juniper
#

Just download and add to path

quaint mantle
#

should be the latest

eternal oxide
#

"Should be"

quaint mantle
#

bruh

opal juniper
#

3.8.1 is latest iirc

quaint mantle
#

idk how to check version

#

build******

eternal oxide
#

about screen

#

latest is Version: 2021-03 (4.19.0)

quaint mantle
opal juniper
#

Lmao

eternal oxide
#

ok you are newer than me 🙂

opal juniper
#

That’s newer

quaint mantle
#

lmao

#

so yeah i have Maven in like

#

the addons

#

im sorry im on like 2 hours of sleep

#

i have maven in the addons, but idk how to install it, because i dont have JAVA_HOME in my environemtnal variables

#

nor "PATH"

eternal oxide
#

in that about screen do you have a m2?

#

one of the icons

quaint mantle
#

i do not :o

nocturne coral
#

how to i turn the tick rate down with a plugin? (a time control effect)

eternal oxide
#

yes you do

#

at teh bottom

quaint mantle
#

wat

#

OH I SEE IT

#

OMG

#

so tiny

eternal oxide
#

So what issue are you having? You have latest Eclipse and maven

quaint mantle
#

i dont have an option to make a new Maven project

#

not like.. New >Maven project

#

but like in Java project

eternal oxide
#

right click in left panel, new Other

quaint mantle
#

if theres supposed to be Maven project i dont see it

eternal oxide
#

scroll down to Maven

quaint mantle
#

yep

#

now to figure out Maven, youtube here i come

#

whats an Archetype

#

ooh

#

i see

summer scroll
#

Can I automatically add a hash map into interface implementation?

quaint mantle
#

which archetype do i use for plugins..?

summer scroll
#

So I want every class that implements PaintButton have a hash map automatically.

eternal oxide
#

Your reference to PlaceholderAPI is null

gritty urchin
#

Hey, could someone explain Bukkit vectors to me please?

ivory sleet
gritty urchin
#

but it doesn't show direction

#

It's just one xyz point.

ivory sleet
quaint mantle
#

in eclipse

#

when you're making an new Maven Project

#

and it forces you to select an Archetype

gritty urchin
ivory sleet
#

tdubz that’s because the magnitude is inferred

eternal oxide
#

perhaps you are trying to register before PAPI is loaded

summer scroll
#

So I can just access the map without the map is actually exist on the class?

#

yeah i think so

ivory sleet
#

the vector automatically starts from 0,0,0 and then goes all the way to x,y,z

grim ice
#

anyone has an idea of how can i check a spawner content?

summer scroll
#

yeah but not visually exist

grim ice
#

@summer scroll hi do u know how to check a spawner entity

smoky finch
#

Is it possible to send a spyglass packet? Hopefully that was clear

quaint mantle
ivory sleet
quaint mantle
#

A

summer scroll
#

alright, thanks for that

grim ice
#

o

ivory sleet
grim ice
#

does anyone know how to check a spawner content?

ivory sleet
#

Content?

grim ice
#

oh ty elgar

smoky finch
grim ice
#

I can't use that right

eternal oxide
#

That is a Block

gritty urchin
eternal oxide
#

do you mean an item?

ivory sleet
tame coral
grim ice
#

like

gritty urchin
grim ice
#

getBlock().getType()

#

i cant use it on that

#

right

eternal oxide
tame coral
grim ice
#

oh

ivory sleet
#

2Hex get the BlockState and then check instanceof and cast to CreatureSpawner is the safest

eternal oxide
#

well teh state anyway

smoky finch
#

I'll just wait for md5 ig

gritty urchin
ivory sleet
#

Might be it triggers an item interaction yeah Simon

quaint mantle
#

can i send sculk sensor's sygnal to entity?

ivory sleet
#

Create a vector where the magnitude is 0.5 then add it to the original one maybe tdubz

tame coral
ivory sleet
#

Nms

tame coral
#

Oh

#

I see

#

Need to learn how to use this lol

#

Only used protocollib yet

quaint mantle
#

phah

#

packets is lower part of NMS

tame coral
#

So i've no idea what's possible with this, sorry ^^'

quaint mantle
#

pathfinders is shit of shit

#

for me

ivory sleet
#

I mean we have navigation controllers and some helpful classes for it

quaint mantle
grim ice
#

EntityType creature = ((CreatureSpawner) e.getBlock().getState()).getSpawnedType();

#

will this work

quaint mantle
grim ice
#

o

ivory sleet
#

Sculk sensor isn’t even in the game?

valid solstice
#
else if(cmd.getName().equalsIgnoreCase("feed")){
                player.setFoodLevel(20);
                player.sendMessage(ChatColor.AQUA + "Your hunger has been set to max!");
            }
``` anybody know why when i execute "/feed", it gives me the usage instead of it working?
grim ice
#

ok but im just asking for suggestions i what im doing is not bs

hardy lagoon
#

Hey, how would I make some code only continue after the called method is finished?

grim ice
quaint mantle
grim ice
#

but its not the right way

ivory sleet
quaint mantle
#

How can i update my scoreboard line like every 40 ticks?