#help-archived

1 messages ยท Page 75 of 1

dusty topaz
#

CraftItemStack

#

is inside of spigot

naive goblet
#

You can't still use it in the Bukkit API

idle zodiac
#

omg

#

my

#

brain

#

hurts

naive goblet
#

You need to convert it into an ItemStack

idle zodiac
#

why did that work

#

HOW DO I GET GUD

dusty topaz
#

CraftItemStack isn't in spigot or the bukkit api

#

it's in craftbukkit

idle zodiac
#

THANKS SO MUCH

naive goblet
#

And surely nms is version dependent which would mean you would probably have to involve modulation or abstraction.

dusty topaz
#

wtf are you talking about

#

he wants to know why his map wont work

frigid ember
naive goblet
#

Well that was not my point.

#

You seem to think we can use CraftItemStack in the Spigot API which is wrong

dusty topaz
#

CraftItemStack isn't in spigot or the bukkit api

#

what are you on about

naive goblet
#

Its in craftbukkit which is a factor that connects the Spigot and Bukkit packages to nms stuff

dusty topaz
#

AvroVulcanToday at 8:31 PM
CraftItemStack isn't in spigot or the bukkit api
it's in craftbukkit

naive goblet
#

Lol yes

dusty topaz
#

'use craftbukkit' is not the answer to his issue

naive goblet
#

Still not my point jesus

#

I mean if you're saying nms, craftbukkit, bukkit and spigot all include in the server jar then my point wouldn't apply anyway?

dusty topaz
#

because you can use the api without having access to nms methods

#

because the api itself doesn't have any nms methods

naive goblet
#

Yes obviously?

dusty topaz
#

i don't even get what your point is

#

you're on about something random that you've somehow derived from his map not working

naive goblet
#

I thought he was trying to cast something from nms to bukkit

frigid ember
#

But you can't cast MapMeta to ItemMeta

naive goblet
#

As it was printing an invalid cast exception but however that wasn't the case and then you came from nowhere making a rude inferrence.

dusty topaz
#

i never said anything rude

#

as for your issue @frigid ember, couldn't tell you

frigid ember
#

Ok

dusty topaz
#

in 1.15, MapMeta is an instanceof ItemMeta

#

public interface MapMeta extends ItemMeta {

#

though it looks like you're using 1.8

dull jasper
#

Did anyone else here experiance massive player time outs from after updating to 1.12.4 from 1.12.2

dusty topaz
#

Though, looking at some old docs it also seems so

naive goblet
#

1.12.4?

dusty topaz
#

@frigid ember you have the right (and only) import by the looks of it

#

so if you are holding a map, you should be able to cast its meta to map meta

#

try looking at the simple class name of the metas class to see what it actually is?

frigid ember
#

bad gateway?

dusty topaz
#

Try refreshing

#

Spigot has been a bit patchy for me also today

frigid ember
#

As well for me

#

mk

oak stump
#

Wait so all in all spigot is down

dusty topaz
#

it's being ddosd, so pretty much at the moment

rapid yacht
#

ok I was just gonna say

#

"My spigot is really messed up atm"

steady osprey
#

i was bout to post a plugim ๐Ÿ˜ฆ

rapid yacht
#

rip

dense rampart
#

that meme where the dude walks in with pizza and everything is on fire

rapid yacht
#

at least spigot has cloudflare ddos protection lmfao

molten whale
#

...

dense rampart
#

wait its a bloody png

molten whale
#

Perfect

steady osprey
#

that happened to me a couple times

rapid yacht
#

^ thats what my spigot looked like lmao

#

welp

dense rampart
rapid yacht
#

I just got this ass plugin and can't replace it yet

dense rampart
tidal mica
#

why does it say atlanta
@dense rampart because you are near Atlanta

dense rampart
#

i am nowhere near atlanta

tidal mica
steady osprey
#

finally

rapid yacht
#

I wonder where I live ๐Ÿค”

steady osprey
#

i live in milk way galaxy

frigid ember
#

I posted the last post before it went down ๐Ÿ™‚

dense rampart
#

my IP says I'm in Washington, Cloudflare thinks I'm in Georgia, but in reality, I'm in Texas

#

bamboozled

rapid yacht
#

oh

#

is the site back up?

frigid ember
#

I think it went back down again

steady osprey
#

wtf i just clicked post resource and it went down again

rapid yacht
#

ok lets all watch a vid to pass the time

steady osprey
#

lets vibe in vc

dense rampart
#

has anyone ever gotten
Browser: Working
Cloudflare: Not working
Host: Working

marsh nova
#

No, because then you wouldn't see the webpage!

steady osprey
#

Youtube gets ddosed

marsh nova
#

(because it's displayed by CloudFlare)

marble jackal
#

My is browser Working
CloudFlare Working
Host not working

dense rampart
#

didnt cloudflare go down twice last year

marsh nova
#

you still can't see "Cloudflare: Not working" because it is a Cloudflare page which displays that message

marble jackal
oak stump
#

Omg if we got everyone in this discord server to ping YouTube we could take it down in a few seconds ๐Ÿคฃ

tidal mica
#

XD

marsh nova
#

totally

marble jackal
tidal mica
#

i don't think

marsh nova
#

it's not like there aren't that many people already viewing YouTube

dense rampart
#

youtube also went down last year too

tidal mica
#

youtube has a lot of servers in a lot of country

#

XD

oak stump
#

Ye just take down the USA xD

dense rampart
#

didnt sonic do that lol

molten whale
#

Cloudflare has a server on the inside of mexico

#

:oooo

marble jackal
#

why spigot is down?

#

the cloudfare is working for me

#

onyle the host not

steady osprey
#

i just wanna post my plugin already holy crap

sturdy oar
steady osprey
#

that happens a lot

marble jackal
#

yep

#

same

#

some times getin

#

and then back the fk host down

#

I think the server host is down

steady osprey
#

do you guys think a plugin that makes it so blazes dont attack or fly should go in Mechanics

marble jackal
#

I think they getting ddos?

#

or soming??

#

i really dont nou

steady osprey
#

yeah they are

viral herald
#
Error:(3, 30) java: package org.bukkit.plugin.java does not exist

IntelliJ error can anyone help 1.8.9 btw

marsh nova
#

I told you I use Eclipse if you need me to help

steady osprey
#

yeag eclipse is way better

marsh nova
#

You need to add the API dependency

worthy lava
#

Are the forums down?

steady osprey
#

spigot got ddosed

worthy lava
#

Serious?

steady osprey
#

yup

worthy lava
#

The hell man....

#

Well if the website isn't working in a few seconds il be back here with me question

#

Yup ok

steady osprey
#

i was about to post a plugin but ig not

worthy lava
#

So im using TextComponents, but whenever the TextComponent goes on a new line, it loses color formatting. How would i fix this?

#

Rip Darth

steady osprey
#

idk i never used TextComponents

sturdy oar
#

you need to put the color for each line

novel phoenix
#

newline support was always bad in minecraft

sturdy oar
#

i think

steady osprey
#

^

worthy lava
#

I mean

novel phoenix
#

"support" well more like lack of support

worthy lava
#

That is a good idea, but considering i don't use ChatColors, that's not gonna work

#

I use color codes

supple arrow
#

It works

steady osprey
#

well they are getting ddosed so they are a bit busy too support

novel phoenix
#

Why do you use TextComponent if you're using color codes

supple arrow
#

You just need to put the color code in before the next line

sturdy oar
#

well I had a library for TextComponents

worthy lava
#

I need to have an [item] function

#

Meaning showing items in chat

#

That's the only reason im using it

novel phoenix
#

The thing is

#

TextComponent supports high level formatting

#

which actually does work with newlines correctly

frigid ember
#

how do I force the MOTD of x server connected to bungeecord to the player?

novel phoenix
#

so you should use builder methods

#

for colors

#

instead of special symbols

supple arrow
#

@frigid ember what do you mean

frigid ember
#

so there is forced host x.domain in mc's server list

#

and you want the player to see the MOTD from x server instead of the global BUNGEE one

worthy lava
#

Well i have gotten an idea, thanks!

paper pumice
#

What happened to spigot

#

LOL

steady osprey
#

ddosed

worthy lava
#

Someone told me they got ddosed

#

^^

sturdy oar
#

they pressed the 'delete' button on

#

on their dedi

#

accidentally

steady osprey
#

they felt for the classic Alt F4 trick

frigid ember
#

nah

#

rm -rf /

sturdy oar
#

rm

frigid ember
#

yeah ik

#

rofl

steady osprey
#

System.exit();

stone chasm
#

Spigot.org has had a lot of 50x errors and broken CSS the last few days. A lot of my friends are also experiencing this. Anyone else utside of scandinavia having this issue?

frigid ember
#

yes

#

help PLZ

#

Error 502
Bad gateway

steady osprey
#

they got ddosed

frigid ember
#

XD

#

ffs they need to add captcha like market

zinc ingot
#

looks like everyone'll have to start over again

#

rebranding to mcspigot

lapis flume
sage sedge
#

Hello, I'm trying to access SpigotMC and it doesn't seem to be working?

steady osprey
#

they got ddosed

sage sedge
#

Isn't that the whole point of Cloudflare.

stone chasm
#

@steady osprey source or dont toss the ddos card. Please.

zinc ingot
#

some person joined like some time ago

#

and supposedly said spigot was insecure

#

ยฏ_(ใƒ„)_/ยฏ

stone chasm
#

Cool. That does not mean anything

zinc ingot
#

make your own generalizations from there

#

he did say he'd show everyone though

steady osprey
#

i was told by SavageLab developer and admins @stone chasm

zinc ingot
#

and shortly afterwards, spigot was less functional

hoary parcel
#

spigot is getting ddosed literally every day, lol

sage sedge
#

Isn't Cloudflare suppose to protect against that?

ancient ridge
#

You would have thought

paper pumice
#

Is there a way to view a crafting recipe of a custom crafting recipe that has been made?

#

Like if I made a custom crafting recipe

#

Is there a method to display that

#

In like a 3x3 UI

steady osprey
#

in its own gui? or the green book thing

paper pumice
#

But like for Essentials plugin, they surely didnt hard code a new gui for every single recipe..

#

How did they get the recipe of an item?

steady osprey
#

idk

alpine lion
#

If I'm remembering correctly, you can iterate through a list of recipes and display them from the ingredients list.

#

plugin.getServer().recipeIterator() I believe

paper pumice
#

Thank you

steady osprey
#

spigots finally up

lofty otter
#

.hasPermission always returns true for the console right?

sharp dune
#

was it getting ddosed

steady osprey
#

yeah

sharp dune
#

Alright, time to go inactive for months

steady osprey
#

๐Ÿ‘

lofty otter
#

was that yes for me?

steady osprey
#

no

lofty otter
#

;-;

steady osprey
#

but i think it does

alpine lion
#

I think as long as the permission is registered. I've seen problems where the console doesn't have permission for things sometimes

steady osprey
#

how do i delete resources i posted bc the ddos made me post 3 of the same pplugins lol

marsh nova
#

lol

frigid ember
fair abyss
#

dont spam @frigid ember .

timber briar
#

Hello

frigid ember
#

Eh I'm not @fair abyss

#

163 posts since I last mentioned that

frigid ember
#

Anyone know any good resources to learn Spigots api/an actual explanation as to how to set up IDEA for plugin development?

#

I know basic java, started learning it 3 weeks ago. I come from C89/C++ so its seeming easy and I wanted to get started understanding spigot/bukkits api for minecraft.

#

My total goal is to design a plugin thart will be moving large block collections

novel phoenix
#

IDE setup is pretty easy for the most part

#

you can actually watch it from "bad" minecraft coding youtubers

frigid ember
#

yeah

#

im just needing some good reference as to how to handle blocks/moving bnlocks/interfacing with the world

#

as I'm going to be making a system that will be moving lots of blocks around almost as if they are one group of blocks.

novel phoenix
#

bukkit API is good designed and if you have enough prior OOP knowledge

#

it will be pretty self explanatory

frigid ember
#

I have decent oop knowledge. I'm not a master at it.

novel phoenix
#

in your case stuff like World and Block are all referenced by objects

#

so you just grab this stuff using API

frigid ember
#

Alright./

novel phoenix
#

and manipulate it as you want

frigid ember
#

Is there any way to say, put a bunch of dynamic block objects into some form of array or list and act on all of them as one?

#

e.g moving all the blocks in the list by 1 x coordinate and not overwriting eachother?

wise dock
#

moving large block collections as in your stated goal is quite resource intensive for a server

#

the idea is, for the most part, everything that happens on a MC server is single threaded and happens one after another

#

so if your plugin is doing a lot of stuff, players can't and will eventually be disconnected

frigid ember
#

I'm likely going to separate the events on a tick schedule

wise dock
#

there are advanced workarounds, such as async world edits (oh the heresy!), but they're fairly advanced and very error prone

frigid ember
#

ahh]

wise dock
#

but a "normal" way to handle what you're after is do say 100 blocks per tick, and keep track where you left next tick

frigid ember
#

Right

novel phoenix
#

yeah speaking of moving large amount of blocks

#

there are plenty of 3rd party API for that

#

that can do stuff really fast

wise dock
#

now, when talking about large amounts of blocks, are we talking millions or more?

frigid ember
#

uhm

#

"Under 6000"

novel phoenix
#

wow

wise dock
#

because then you run into other issues such as the world changing around a player as they sit and do nothing, which can be pretty funny if done right

novel phoenix
#

default API is safe for 6k blocks lol

wise dock
#

6000 is not much

novel phoenix
#

you don't even have to spread it into tasks

frigid ember
#

If I can be honest I've got the impossible dream to make a very very very very very very tiny version of movecraft. I'm wanting to make some very tiny say like 3-4 block things that move on the water as one entity

#

and explode

wise dock
#

to get you going, here's an easy way to do what you want, though not most efficient: you put the blocks you want in say an ArrayList. Right?

frigid ember
#

Yes.

wise dock
#

Then you iterate thru the blocks, and update say their Y coordinate by 1 to make them move up by 1 block

#

That's all

frigid ember
#

Right.

#

Thing is, will the end user see those blocks moving one at a time?

wise dock
#

Not if you're doing it all at once in the same tick

frigid ember
#

And what happens if I want to move three blocks forward, wouldnt they overwrite eachother?

wise dock
#

They would overwrite what's in the destination, yes

frigid ember
#

Thats also the issue

terse schooner
#
12.05 20:50:06 [Server] Craft Scheduler Thread - 9/WARN java.lang.NullPointerException
12.05 20:50:06 [Server] Craft Scheduler Thread - 9/ERROR [SCHEDULER] Exception thrown whilst executing task

My console keeps saying this, non stop. uh

#

Anyone know what that is?

wise dock
#

Also, not all "blocks" are equal. For example chests... you can't move them as you please and keep their contents intact

frigid ember
#

Oh yeah i dont care about NBT tags

wise dock
#

You have to look at what the block type is, and perform special actions in some cases.

#

Oh you don't need NBT to handle chests, there are API functions for doing everything you need.

frigid ember
#

but my main issue is the perceived lag of half the collection of blocks moving and then the other half moving and blocks overwriting eachother, as the blocks will be treated "together" as one collection and will all move as one entity forward/backward/etc

wise dock
#

@terse schooner probably a bad coded plugin that's having some issues. try narrowing it down by removing plugins one at a time

terse schooner
#

Uhm

#

I can actually just hide the message from the console

#

would you advise that?

frigid ember
#

hence why I need some way to prevent blocks from overwriting eachother and instead updating all the blocks x coordinates or setting a destination, then updating them so all of them move without overwriting eachother

#

yes @terse schooner but it will still have an error.

wise dock
#

no Slippy i would not. it's the equivalent of room on fire but "everything is fine."

#

it can mean nothing, safe to ignore, but also can mean something's not working right

#

no way to know just from that message

#

figure out what's causing it first, then make an informed decision whether to ignore it or not

#

@frigid ember I'm not sure what's your actual intended behavior here. So let's say... you move 1 block up. And in the destination is also 1 block (not air). You want to move that up too?

terse schooner
#

I recently installed holograms so I'm pretty sure it's that -- I've never seen this before and haven't added anything else recently

#

uh

wise dock
#

And what if there's a block where that goes... you see where I'm going with this

frigid ember
#

let me get a picture for better explanation

terse schooner
#

but holograms is working fine. Everything is, actually. And even if it isn't "fine", there's no reason for me to see the same message literally like 500 times

frigid ember
#

ms paint but

latent rock
#

I9 9900K or Ryzen 9 3900x for 1.15.2 survival?

wise dock
#

what you do next is up to you ๐Ÿ™‚ but it's bad server admin practice to just hide inconvenient messages without knowing the implications

#

That's fine @frigid ember. So if I'm understanding this correctly you want to move as many blocks as it takes until there's an empty block (nothing to move).

frigid ember
#

again im sort of trying to make a tiny movecraft ๐Ÿ˜‚

#

So there will be function calls that will shift the "collection" of blocks location by x y or z coordinates

wise dock
#

Right. Well then here's an idea: starting from your "source" block, start scanning blocks in the world until you hit an air block, adding the blocks as you go in say a stack.

#

Then you start popping blocks from the stack and move them 1 block in the chosen direction.

frigid ember
#

Hmm

wise dock
#

Because of how the stack works, first block you pop would be your rightmost one in your picture.

frigid ember
#

That was just an example actually... the collection may be in three dimensions...

#

like a sphere or something

wise dock
#

principle still holds

frigid ember
#

And, it may or may not be in the water...

wise dock
#

you would just have a 3d collection of stacks... lots of data

frigid ember
#

So my ridiculous goal is to find some way to generate a list of blocks that are all connected to eachother, then asynchronously (without the blocks moving into eachother) move that full collections locations

wise dock
#

what you do if say you have 3 columns moving and only the middle one hits something?

frigid ember
#

either by x y or z

#

If the middle one hits something then it will be considered that the whole entity collided with something

wise dock
#

okay then all stop moving

frigid ember
#

yeah

wise dock
#

async isn't a thing i would recommend, to be honest

frigid ember
#

How will I prevent blocks from overwriting eachother though?

#

If they move into one and another the blocks no longer exist and can't be referenced

wise dock
#

here's another idea, much simpler and with no additional memory requirements but your initial block structure

#

say you're moving up, right?

frigid ember
#

Yes

wise dock
#

instead of starting from the bottom and move blocks, you start from the top of your contraption

frigid ember
#

ahh

wise dock
#

you have a cuboid as a contraption

#

you scan the topmost line of blocks, ignore where's air, and where's a solid block check the block it would be moving into. if there's a solid block, stop. you hit something. if not just move that "slice"

#

proceed to next slice down, but this time just move everything including air blocks

#

and so forth until you hit bottom

frigid ember
#

Hmm.

#

I don't know how I would A create the cuboid region and B actually separate a 3d region into slices

wise dock
#

cuboid region you can conceptually create it as a 3 dimension array

#

in fact i would actually use an old school array like Block[][][]

#

much faster to iterate thru than collections

frigid ember
#

Hmm ok.

wise dock
#

so you know your contraption size, hence you can dimension the array on all 3 dimensions

#

then just load the contraption blocks into your array and you're set

frigid ember
#

Hmm

wise dock
#

each dimension is 1 coordinate, first being X, then Z then Y

#

or however you see fit

frigid ember
#

So now that I have an array of blocks how do i move all the blocks say forward

#

just a "for" loop for every index?

wise dock
#

yes, but not like that

#

you have to separate your code in 2 parts: first is the first "slice" where you check collisions with the world

#

the other is moving everything else, including air, with no checks

frigid ember
#

got it

#

thing is, how would I discern the collection touching eachother as not a collision

wise dock
#

because you don't check for those slices

#

let me explain

frigid ember
#

Well say the top slice is touching the bottom slice, isnt that a collision?

wise dock
#

say you're moving into positive X direction your contraption

frigid ember
#

yes

wise dock
#

this means your highest X is the "slice" that moves first. say your contraption is actually a 2 by 2 block of solid stone

#

then first X is 0, second is 1, and so forth on all 3 coordinates right?

frigid ember
#

So I've got this now, but this is what happens when I set the zoom to farthest.


    @EventHandler
    public void onInteract(PlayerInteractEvent e) {
    Player p = e.getPlayer();

    MapView view = Bukkit.createMap(p.getWorld());
    view.addRenderer(new Render());

    Action ac = e.getAction();

    if (ac == Action.RIGHT_CLICK_AIR) {
        view.setScale(Scale.FARTHEST);
    } else {
        view.setScale(Scale.CLOSEST);
    }
    ItemStack mapItem = new ItemStack(Material.MAP, 1, view.getId());

    p.getInventory().setItemInHand(mapItem);
    p.sendMessage(view.getScale().toString());
    }

Also do you guys know why it flckers?

    Map<UUID, Integer> perPlayerCounter = new HashMap<>();

    @SuppressWarnings("deprecation")
    @Override
    public void render(MapView map, MapCanvas canvas, Player player) {
    Integer counter = perPlayerCounter.get(player.getUniqueId());
    counter = counter == null ? 0 : counter;
    final WorldMap worldMap = (WorldMap) MinecraftServer.getServer().worlds.get(0).worldMaps.get(WorldMap.class,
        "map_" + map.getId());

    if (counter % 8 == 0) {
        for (int i = 0; i < worldMap.colors.length; i++) {
        worldMap.colors[i] = 0;
        }

        worldMap.decorations.clear();
        map.setWorld(player.getWorld());
        map.setCenterX(player.getLocation().getBlockX());
        map.setCenterZ(player.getLocation().getBlockZ());

        if (player.getItemInHand().getType() == Material.MAP
            && player.getItemInHand().getDurability() == map.getId()) {
        worldMap.a(((CraftPlayer) player).getHandle(), CraftItemStack.asNMSCopy(player.getItemInHand()));
        }

    }

    perPlayerCounter.put(player.getUniqueId(), counter + 1);
    }
wise dock
#

now, since you're moving towards positive X, the slice you process first is the one where X is 1

#

you keep X constant at 1, and iterate thru all Y and Z looking for collisions with blocks in the world in the corresponding coordinates

frigid ember
#

hmm

wise dock
#

if it's air, you place the block, otherwise you stop

frigid ember
#

again what happens if the blocks are touching eachother, how can I discern the blocks touching themselves with touching blocks that arent part of the collection?

safe thunder
#

hello guys

#

my server has been crashed

#

Description: Exception in server tick loop

java.lang.OutOfMemoryError: Java heap space
at it.unimi.dsi.fastutil.longs.Long2ObjectOpenHashMap.rehash(Long2ObjectOpenHashMap.java:1061)
at it.unimi.dsi.fastutil.longs.Long2ObjectOpenHashMap.insert(Long2ObjectOpenHashMap.java:272)
at it.unimi.dsi.fastutil.longs.Long2ObjectOpenHashMap.put(Long2ObjectOpenHashMap.java:280)
at net.minecraft.server.v1_15_R1.RegionFileSection.a(RegionFileSection.java:120)
at net.minecraft.server.v1_15_R1.RegionFileSection.loadInData(RegionFileSection.java:103)
at net.minecraft.server.v1_15_R1.PlayerChunkMap.lambda$f$23(PlayerChunkMap.java:959)
at net.minecraft.server.v1_15_R1.PlayerChunkMap$$Lambda$3325/1429481091.apply(Unknown Source)
at net.minecraft.server.v1_15_R1.PlayerChunkMap.lambda$null$24(PlayerChunkMap.java:991)
at net.minecraft.server.v1_15_R1.PlayerChunkMap$$Lambda$3388/599822419.run(Unknown Source)
at com.destroystokyo.paper.io.chunk.ChunkTaskManager.pollChunkWaitQueue(ChunkTaskManager.java:200)
at net.minecraft.server.v1_15_R1.ChunkProviderServer$a.executeNext(ChunkProviderServer.java:1065)
at net.minecraft.server.v1_15_R1.ChunkProviderServer$a.midTickLoadChunks(ChunkProviderServer.java:1051)
at net.minecraft.server.v1_15_R1.MinecraftServer.midTickLoadChunks(MinecraftServer.java:1062)
at net.minecraft.server.v1_15_R1.MinecraftServer.b(MinecraftServer.java:1254)
at net.minecraft.server.v1_15_R1.DedicatedServer.b(DedicatedServer.java:430)
at net.minecraft.server.v1_15_R1.MinecraftServer.a(MinecraftServer.java:1169)
at net.minecraft.server.v1_15_R1.MinecraftServer.run(MinecraftServer.java:958)
at java.lang.Thread.run(Thread.java:748)

wise dock
#

i think you're confusing something. you know the blocks that are part of your collection

frigid ember
#

oh

#

Wait

wise dock
#

that list of blocks in your collection never changes

frigid ember
#

are block objects updated automatically?

#

like are the block objects literal representations of the block at x y z

safe thunder
#

@frigid ember can help me ?

frigid ember
#

.-.

wise dock
#

@safe thunder you need to give your server more memory, if you can. otherwise trim down the plugin list so they take less resources

safe thunder
#

12 plugin is installed

#

2 gb ram

frigid ember
#

version?

wise dock
#

how many players?

safe thunder
#

1.15.2 latest

frigid ember
#

oooof

safe thunder
#

how many players?
@wise dock 4

frigid ember
#

2gb on 1.15.2

safe thunder
#

yes

wise dock
#

how often you restart your server?

safe thunder
#

I planned move 4 gb ram of server.

frigid ember
#

too little you'll need like 4 or 6

#

yeah

safe thunder
#

how often you restart your server?
@wise dock 1 day = 1 restart manually

#

too little you'll need like 4 or 6
@frigid ember no I tested 1.14 version is not crashed ?

#

2 gb ram

wise dock
#

umm... therein lies your problem. grab a plugin to restart it every 6 hours and you should be fine, for the most part

#

unless your players do crazy worldedit things, it might just work fine for you

safe thunder
#

hmm

#

strange

wise dock
#

but certainly at that ram restart it more often than once per day

frigid ember
#

if only there was a library I could import that automatically gives me access to moving blocks unanimously. Does FAWE have some sort of package for the immediate moving of blocks?

wise dock
#

yes

frigid ember
#

oop

#

where can I find the source for FAWE?

safe thunder
#

but certainly at that ram restart it more often than once per day
@wise dock 1 day = 1 restart is continiue ?

wise dock
frigid ember
#

Heatseeker where can I find a reference for say a front end API for it? I don't see anything that has a reference to front end functions or stuff on there

#

Only src

wise dock
#

try clicking on the "Wiki" button on top ๐Ÿ™‚

#

other than what's in there, you just dive in the source and see where stuff happens you can use and well... use that

frigid ember
#

Wiki doesn't havr any examples. Also the amount of code In the source is huge. I don't know where I could find a front end interface.

wise dock
#

It may not have a front end, you may have to look in the source to see where you could hook in. Ask in their Discord for more info, I've never interacted with FAWE from my plugins

latent rock
#

does sata/sas storage type matter for mc servers

wise dock
#

the faster the better, yes

#

mc servers constantly save and load world chunks from disk, especially with many players

frigid ember
#

Hmmmmm

wise dock
#

On a side note @frigid ember if you really want to learn MC programming, do it all yourself without FAWE. It'll be a much better learning experience, and your idea is quite complex so you'll hit quite a lot of things

frigid ember
#

All I need is a data type that can be modified or added to of a series of blocks

#

But when moved are movjng as one and don't overwrite eachother

wise dock
#

There's no such thing prebuilt. You have to roll your own.

frigid ember
#

Mmmm

#

How might I do that?

wise dock
#

Start from a single Block and learn World interactions. How to replace in world blocks, how to make it so it appears you're moving a block and go from there

#

Make a single stone block appear to move 10 blocks on X axis in air

#

But make it so the effect is visible to in game players, like if they look up they will see a stone block travel 10 blocks say over 10 seconds

#

Then change your plugin so the block stops moving when it hits another block

#

From there you can have 2 stone blocks move at the same time. Keep expanding as you learn how to do it, until you'll be moving entire complex structures as you want

frigid ember
#

Right

#

Now how will I recognise a real collision vs the collection of blocks touching eachother as they shouls

wise dock
#

This will hit quite a lot of things, such as runnables, scheduler, single thread, world interactions and so forth

#

I've told you how, but you need more MC programming experience to apply it.

frigid ember
#

Yes.

#

@wise dock Are there any good video tutorials for block and world interactions

#

and hell how to set up a plugin right?

#

I can learn java itself and re-learn it well with my stuff but I dont know shit about miencrafts api wel llmao

wise dock
#

Not sure what to recommend for the time being, sorry

frigid ember
#

np

sturdy oar
#

Minecraft Dev plugin'

frigid ember
#

?

worldly heathBOT
#

Edit this to change the output of the command!

keen compass
#

@frigid ember you need to draw the pixels yourself

frigid ember
#

This is my render class @keen compass

    private final WorldMap worldMap;

    public Render(WorldMap worldMap) {
    super(false);
    this.worldMap = worldMap;
    }

    Map<UUID, Integer> perPlayerCounter = new HashMap<>();

    @SuppressWarnings("deprecation")
    @Override
    public void render(MapView map, MapCanvas canvas, Player player) {

    Integer counter = perPlayerCounter.get(player.getUniqueId());
    counter = counter == null ? 0 : counter;

    if (counter % 20 == 0) {
        worldMap.decorations.clear();
        map.setWorld(player.getWorld());
        map.setCenterX(player.getLocation().getBlockX());
        map.setCenterZ(player.getLocation().getBlockZ());
        for (int x = 0; x < 128; ++x) {
        for (int y = 0; y < 128; ++y) {
            canvas.setPixel(x, y, worldMap.colors[y * 128 + x]);
        }
        }
    }

    perPlayerCounter.put(player.getUniqueId(), counter + 1);
    }
#

If I set the zoom to normal, it only shows the center part

keen compass
#

@frigid ember need to search further out then

#

128 is for a small map, and 2048 is for the largest map

#

just fyi

ornate birch
#

I ran into a problem when trying to get two pieces of information of an entity: where its head is facing (i.e. where they're looking at) and where its body is facing (along the XZ axis).
I expected to find the first with entity.getEyeLocation().getYaw() and the second with entity.getLocation().getYaw(), but by my testing, they're always the same thing, no matter the LivingEntity or their position. Is this a bug?
Maybe relevant: inspecting NMS' source, I found that when an entity moves its head, its yaw will be updated, but the entity will wait some time before turning its whole body to wherever they're looking at.

frigid ember
#

Oh, alright thanks @keen compass , that helps alot I thought it was 128 for all of them

keen compass
#

128 is 8x8 chunks

#

and 2048 is 128x128 chunks

#

if that helps to see their factor

#

and it gives you the size of each map for each level of zoom as well as how many chunks it represents

latent rock
#

anyone know if i9 9900K is better than ryzen 9 3900x??

#

for 1.15.2

wanton delta
#

well

#

for minecraft

#

it wont matter

#

at that point

frigid ember
#

@keen compass I've got this so far,

    for (int x = 0; x < maxValue(map.getScale()); ++x) {
        for (int y = 0; y < maxValue(map.getScale()); ++y) {
        canvas.setPixel(x, y, worldMap.colors[y * 128 + x]);
        }
    }

But I'm getting this error

worldly heathBOT
frigid ember
cloud sparrow
#

a index out of bounds

#

in a list inside of that plugin

#

meaning a list is trying to grab a position out of a list that isn't valid.

latent rock
#

it wont matter

like, hosting a 1.15.2 server
i9 9900K vs ryzen 9 3900x
idk if the trading the better multi core speeds are worth the +5% in single core speed of i9

keen compass
#

@frigid ember the map scales at multiples of 128. The map size in pixels doesn't change, but the blocks it represents does.

fleet crane
#

It's a bug if you renamed your world

#

SPIGOT-5348

#

Though maybe not the same things yours is about saving not loading

terse schooner
#

wait, mine?

marsh nova
#

Renaming world = bug? Oh my

viral herald
ashen stirrup
#

Whatโ€™s the problem?

#

Oh

frigid ember
#

@keen compass , so I've gotten up to this, but I'm confused now

    @Override
    public void render(MapView map, MapCanvas canvas, Player player) {

    int mY = maxValue(map.getScale());
    for (int x = 0; x < 128; ++x) {
        for (int y = 0; y < 128; ++y) {
        canvas.setPixel(x, y, worldMap.colors[x + y * 128]);
        }
    }
    

    worldMap.decorations.clear();
    map.setWorld(player.getWorld());
    map.setCenterX(player.getLocation().getBlockX());
    map.setCenterZ(player.getLocation().getBlockZ());

    }

I don't know how to get it to fill up the whole area when I do this canvas.setPixel(x, y, worldMap.colors[x + y * 128]); for higher zoom levels

frigid ember
#

i am running into some issues with java, i am trying to compare two strings but does not seem to be working properly, any idea how to compare the strings only and not the object

dusty topaz
#

that is what string.compareTo does

#

What issue are you having

frigid ember
#

i tried compare to

dusty topaz
#

show some code and tell us the issue

frigid ember
#

but it seems to be comparing the object not the string value

#

i dunno

dusty topaz
#

we can't help you with "its not working"

#

show code, say the issue and we will help you

wanton delta
#

when you say compare

#

wdym

frigid ember
#

il send screenshot

#

but in the meantime

#

i have

#

basically

wanton delta
#

theres different definitions of compare

frigid ember
#

one string that stores an initial value

#

and then i go into a loop

#

and update that inital value

wanton delta
#

code snippet would be the best at this point

frigid ember
#

being able to upload files would be good aswell

wanton delta
#

you need to verify your account with spigot

#

or use

wanton delta
#

?paste

worldly heathBOT
frigid ember
#

u see that?

wanton delta
#

yes

#

so compareTo(string) == 0 means youre asking if the strings are the exact same

frigid ember
#

i am pretty sure its fucked up in the compareTo line

wanton delta
#

why not use .equals?

frigid ember
#

i checked the other code 100 times

#

that did not work

#

i tried ==

wanton delta
#

then you should do some debugging

frigid ember
#

and equals

#

and compareTo

wanton delta
#

the way to check if strings are equal is to use .equals

frigid ember
#

at some point the comparisons fails completly

#

at some point it works partially

wanton delta
#

you should System.out.print the strings youre trying to compare

#

and see what its using

frigid ember
#

its just the block data

#

minecraft:air

#

it copies every block into hashmap

#

in a chunk

wanton delta
#

so m ymain concern is why youre comparing block data

#

as strings

#

and not actual blockdata

#

what are you trying to compare exactly?

frigid ember
#

cause its fasta?

wanton delta
#

i dont think its faster. no.

#

and you should not be worried about speed

frigid ember
#

k il try blockdata object

#

comparison

#

il use compareto

wanton delta
#

no

#

nononono

#

use BlockData#matches

frigid ember
#

wait

#

ok

frigid ember
#

oh

#

gud idea

fleet crane
#

Equals probably what you want tbh

keen compass
#

@frigid ember I think you need to update the render or add a new one

frigid ember
#

How do I get the color of a block?

#

k im trying matches now

#

i think its working?

#

it looks sketchy

#

in the file

#

thanks

#

for the help

keen compass
#

that tells you how to map colors of blocks to the map or how it is done anyways

bitter palm
#

Hello! I'm struggling to figure out how to set a button into the world through the Bukkit/Spigot API. Any ideas? Here's the only two attempts I've found that don't error (but still don't work):
world.getBlockAt(x,y,z).setBlockData(Bukkit.createBlockData("minecraft:stone_button"),false);
world.getBlockAt(x,y,z).setType(Material.STONE_BUTTON,false);

frigid ember
#

yeah seems to be working

#

cool

#

whats the false for

#

i just pass in the data and thats it

#

getServer().getWorld(world_name).getChunkAt(chunk_x, chunk_z).getBlock(x, y, z).setBlockData(getServer().createBlockData(blockdata));

#

thats what i do

bitter palm
#

false just makes it not update blocks (prevents lag since I'm using a function that sets a ton of blocks at once)

wanton delta
#

chunk.getBlock gets the block relative to the chunk not the actual block iself

frigid ember
#

ik the coords are different

#

chunks are 256 16 16

#

y x z

wanton delta
#

i know

frigid ember
#

that seems it should work

#

just dont run async

bitter palm
#

Yeh, but I'm not using chunks...

frigid ember
#

ur code

#

should work

wanton delta
#

but it doesnt

bitter palm
#

Yeh... but it doesn't, so...

wanton delta
#

are you sure that the code is getting to that point?

bitter palm
#

Yep, It's part of a function

wanton delta
#

code snippet please

bitter palm
#

Here is my current code

#
            if (args[0].equalsIgnoreCase("room")) {
                for(Player player:Bukkit.getOnlinePlayers()){player.teleport(new Location(world,0.5,31.0,0.5,0,0));}
                this.lock = true;
                if (args.length == 1) {
                    terrain.fill(-5,28,-5,5,36,5,"air");
                    terrain.fill(-4,28,-4,4,28,4,"bedrock");
                    terrain.fill(-4,36,-4,4,36,4,"bedrock");
                    terrain.fill(-4,29,-5,4,35,-5,"bedrock");
                    terrain.fill(-4,29,5,4,35,5,"bedrock");
                    terrain.fill(-5,29,-4,-5,35,4,"bedrock");
                    terrain.fill(5,29,-4,5,35,4,"bedrock");
                    terrain.fill(-4,29,-4,4,29,4,"stone_bricks");
                    terrain.fill(-4,35,-4,4,35,4,"oak_planks");
                    terrain.fill(-3,30,-4,-3,34,-4,"oak_log");
                    terrain.fill(3,30,4,3,34,4,"oak_log");
                    terrain.fill(3,30,-4,3,34,-4,"oak_log");
                    terrain.fill(-3,30,4,-3,34,4,"oak_log");
                    terrain.fill(-4,30,-3,-4,34,-3,"oak_log");
                    terrain.fill(4,30,3,4,34,3,"oak_log");
                    terrain.fill(4,30,-3,4,34,-3,"oak_log");
                    terrain.fill(-4,30,3,-4,34,3,"oak_log");
                    terrain.fill(-2,30,-4,2,34,-4,"oak_planks");
                    terrain.fill(-2,30,4,2,34,4,"oak_planks");
                    terrain.fill(-4,30,-2,-4,34,2,"oak_planks");
                    terrain.fill(4,30,-2,4,34,2,"oak_planks");
                    terrain.fill(-1,31,3,1,31,3,"stone_button");
                    return true;}
                else {
                    
                }
            }```
wanton delta
#

what is terrain.fill

#

show me that

frigid ember
#

ye

bitter palm
#

Just making a pastebin one sec

wanton delta
#

ok

bitter palm
#

This is my attempt using BlockData, but it does the same with Material

wanton delta
#

im not very knowledgable with this

#

but stone buttons require a block face to be put on

#

have you tried to do that?

bitter palm
#

Me neither- this is my first time using the Bukkit/Spigot API so ๐Ÿ˜‚

frigid ember
#

i have been messing around with block data for weeks

oblique prism
#

so the block is placed at line 12.

#

all other block types work aside from button

bitter palm
#

Where I'm putting it should work because there is a block north of it which is the direction buttons face opposite to by default

oblique prism
#

Material.STONE_BUTTON doesn't place

bitter palm
#

And yes correct

oblique prism
#

so how does one place a button

#

?

worldly heathBOT
#

Edit this to change the output of the command!

wanton delta
#

?

worldly heathBOT
#

Edit this to change the output of the command!

wanton delta
#

haha

bitter palm
#

?

worldly heathBOT
#

Edit this to change the output of the command!

oblique prism
#

try setting the blockface @bitter palm I thin that might solve it

#

so minecraft:stone_button[blockface=south] or something like that idk how these work

#

or facing=south

#

'idk

bitter palm
#

But yeh, if I /setblock a button in a place where there isn't a block North of it, it will break, however when I setblock it in the locations I'm currently doing with my script, it works fine

oblique prism
#

i think you need to specify face when using blockdata

bitter palm
#

I've tried, just to be sure, but South is definitely the default and definitely the direction I need it to face ๐Ÿ™

oblique prism
#

did you do =south?

bitter palm
#

Yep

#

If I do anything else, it shows an error

#

So I know I've done it right since there's no error, however it still doesn't place the button

terse schooner
wanton delta
#

It's a bug if you renamed your world

oblique prism
#

so noone has ever placed a button with code?

#

xD

#

unlucky @bitter palm

bitter palm
#

haha

frigid ember
#

want me to try rn?

bitter palm
#

Seems like it ๐Ÿ˜•

frigid ember
#

lol

bitter palm
#

Sure haha

frigid ember
#

ok

#

seems to work on 1.13.2

#

@bitter palm

bitter palm
#

Bruh

#

I'm on 1.15.2 but don't think it would/should make a difference

frigid ember
#

player.getWorld().getBlockAt(player.getLocation()).setType(Material.STONE_BUTTON);

#

thats what i did

bitter palm
#

That's what I originally did

sweet hemlock
#

Make block, cast it as Button, set facing to the face you want it to face

oblique prism
#

hopper might be your server again

frigid ember
#

u could specify the face in the blockdata

#

in [] too

#

and update the block data

sweet hemlock
#

I don't know if spigot supports metadata by specifying them in something like []

oblique prism
#

does

#

@bitter palm 's server seems to always do strange things

#

like 1 second ticks

bitter palm
#

I'm on a new server

#

And that was because of a plugin I used to have- I told you lol

#

I don't have that plugin anymore

oblique prism
#

still sounds funny af

bitter palm
#

It's as default of a server as I can now lol

sweet hemlock
#

If you mean Minecraft command, [] works

#

but you would be using classes when programming it in Spigot API

bitter palm
#

To be specific, though, my first attempt was terrain.fill(-1,31,3,1,31,3,Material.STONE_BUTTON);

frigid ember
#

1.15 can be a bit sketchy

sweet hemlock
#

that looks like 3 buttons

frigid ember
#

im not using any time soon

bitter palm
#

Yes, it is supposed to do 3 buttons. That's what I'm trying to do

oblique prism
#

you should do

Bukkit.pleaseMrSpigot("allow me to place that button for once"):
terrain.fill(-1,31,3,1,31,3,Material.STONE_BUTTON);
Bukkit.thankYouMrSpigot("for allowing me to place that shiny button");
bitter palm
#

bruh

frigid ember
#

maybe ur other code is not working properly

#

other than the Material.STONE_BUTTON part

bitter palm
#

It works with most blocks except very specific things like buttons, doors and levers, it seems

oblique prism
#

so anything that has a face?

frigid ember
#

that smells like 1.15

oblique prism
#

does smell like 1.15

bitter palm
#

Maybe sleepingpie?

frigid ember
#

i tried getting drops from 1.15

#

guess what i found out

#

DIAMOND_ORE has no drops

#

k bro

oblique prism
#

hm

night bison
#

Hey guys I have a weird question

oblique prism
#

so there's no way around it. maybe md5 knows

bitter palm
#

Maybe Mojang knows. Maybe only Bill Gates knows

frigid ember
#

bill gates wat

#

he probably busy counting his dollars

oblique prism
#

@bitter palm you could get handle on the tick system, stop it temporarily, read the world file and write a button to it, save the world file and flush from memory the world chunk that the button was in, then release the tick system.

night bison
#

Im wanting to see if a plugin exists. I want to be able to spectate a player except actually make it look like you're looking through their eyes. I want to be able to see their inventory/hand/skin if possible. I know minecraft has a built-in spectating plugin, but you cant see inventory and the hand completely disappears

oblique prism
#

I think that's the solution to place a button.

bitter palm
#

I was originally gonna say Notch knows but then I remembered the tragic days ๐Ÿ˜‚

night bison
#

Does anybody know of a plugin that will achieve this?

oblique prism
#

you cant McMatt it would look terrible for the client

night bison
#

It doesnt need to look great

oblique prism
#

i mean absolutely terrible

#

the client would fight with it

bitter palm
#

^^^ in spectator, you canโ€™t see inventory, but without spectator youโ€™d see the inside of their body & wouldnโ€™t actually see what they see

oblique prism
#

unless the client is in spectator it wont let the server control it

night bison
#

hm ok

oblique prism
#

you can write a new client

#

mod

night bison
#

I might just have to hack it with commands

bitter palm
#

You could do some protocol magic to hide the player like in some lobby plugins but even then it would be messy

#

I definitely think it would be possible but wouldnโ€™t be perfect & wouldnโ€™t exactly be easy to accomplish, I can imagine

night bison
#

What if it only needs to show inventory

#

and the selected slot

bitter palm
#

You wouldnโ€™t be able to do selected slot

#

But for the inventory, thereโ€™s many plugins that can do that

night bison
#

selected item?

bitter palm
#

Iโ€™m lretty sure itโ€™s in the Essentials plugin (/invsee)

#

No, you canโ€™t show selected item unless you did it in some jank way using lore or enchanting the item or using a resource pack

night bison
#

Basically, Im creating a bot that can be controlled with code but I need to be able to spectate it as if I was the player bot

bitter palm
#

Any ideas why the wood is placed but not the button? It's not to do with facing or face, I've already tested that a ton...java terrain.fill(-4,30,3,-4,34,3,Material.OAK_LOG); terrain.fill(-2,30,-4,2,34,-4,Material.OAK_PLANKS); terrain.fill(-2,30,4,2,34,4,Material.OAK_PLANKS); terrain.fill(-4,30,-2,-4,34,2,Material.OAK_PLANKS); terrain.fill(4,30,-2,4,34,2,Material.OAK_PLANKS); terrain.fill(-1,31,3,1,31,3,Material.STONE_BUTTON);Terrain: https://hastebin.com/ofovecegim.java

frigid ember
#

you really want that to work

#

hmm

bitter palm
#

Well yeh I want buttons haha

frigid ember
#

k il mess around with it

bitter palm
#

alr

#

Want me to DM you the source code for my plugin so far?

frigid ember
#

ye

#

plz

oblique prism
#

should probably explain the way you place blocks, what terrain does xD

#

it's not really straight forward

bitter palm
#

Fair enough, I'll try my best even though you did most of it haha

#

Pretty much, it has a queue (batchQueue) and when the fill function is called, it adds every block in that region to the queue and every tick, a batch of blocks (per) from the queue is placed into the world (unless the queue is empty, off course)

terse schooner
#

Wait, so.. Martoph, does that mean it'll resolve if I rename my world to NORMAL or wtv?

full mist
frigid ember
#

@bitter palm i have determined that the fill function works with stone buttons

#

on 1.13.2

bitter palm
#

So why not on 1.15.2? ๐Ÿค”

frigid ember
#

not too sure

bitter palm
#

Have you tried /ds room? Does the actual room generate fine in 1.13.2?

frigid ember
#

i logged in

#

and i got tped

#

blocks started changing

bitter palm
#

Yep

frigid ember
#

and buttons appeared too

#

on the wood

bitter palm
#

And were there 3 stone buttons at the end

#

Hm

frigid ember
#

there were errors on console

bitter palm
#

Oh?

#

Probs just errors to do with running a 1.15 plugin in 1.13

#

lemme see

frigid ember
#

org.bukkit.plugin.AuthorNagException: No legacy enum constant for OAK_PLANKS. Did you forget to define api-version: 1.13 in your plugin.yml?

#

i think those ez to fix

worldly yacht
#

hello, my heroes premium plugin is not working properly, everytime that a player joins or re-joins my server, the plugin does not show itself, i have to type /reload so i and the player can see the life, mana, stamina and etc, and i dont want to type that everysingle time that a player joins or re-joins the server

bitter palm
#

change the api-version in plugin.yml xd

frigid ember
#

but at the end

#

not sure why it does not work on 1.15

bitter palm
#

Hm very odd

frigid ember
#

with the buttons

bitter palm
#

ye

#

Seems like a question for the Spigot devs

full mist
bitter palm
#

What's the best way to ask a question from the Spigot devs?

worldly yacht
#

@full mist

Anyone have any ideas?
@full mist

I use LaggRemover plugin, but i dont have enough players on my server to know if it is working

full mist
#

@worldly yacht Have any idea whether Clearlag or Lagg remover is better?

worldly yacht
#

i dont have any knowledge about clearlag, i am hearing about it from you

stiff monolith
#

Friends, I'd like to ask you a question.
Is how to compile multiple ".java" files together and finally compile a jar file.

full mist
#

@stiff monolith Use Apache MAVEN.

worldly yacht
#

how do i talk with an staff? i have buy an plugin and its not working propperly

stiff monolith
#

Just click on his avatar.

frigid ember
#

@bitter palm

stiff monolith
#

@full mist Thank you. Can you teach me in detail? I'm not very good at java.

bitter palm
#

hm?

frigid ember
#

proof

bitter palm
#

yeh that's what it's supposed to do

#

I believed you xd

full mist
#

Lol I can't write java only compile it sorry @stiff monolith . Check out how others have done their pom.xml files.

#

And if MAVEN is too hard use Gradle.

stiff monolith
#

Now I'm getting a copy of the source code, and I'm going to modify some of the text and compile it.

frigid ember
#

ha

#

@bitter palm they disappear when i reload the server

bitter palm
#

tf

frigid ember
#

gone

bitter palm
#

Oh I know why

stiff monolith
#

What do you mean, disappear?

frigid ember
#

poof

bitter palm
#

cos when the plugin loads, it gets the room ready to start building

full mist
bitter palm
#

And it builds everything else when a player joins

frigid ember
#

maybe thats why it does not work for you?

bitter palm
#

Steviebeenz ur spamming a lot ngl

#

No DENY, because once you rejoin they'll reappear I bet

frigid ember
#

ok

#

il try

bitter palm
#

mk

frigid ember
#

ah yes

#

works

bitter palm
#

ye

frigid ember
#

so it seems like a 1.15 issue

#

funny story actually

bitter palm
#

Likely an issue to do with Spigot 1.15 not being fully bugproof yet

frigid ember
#

i tried hosting a vanilla minecraft server a few months ago the latest version

#

and it could not even generate the chunks

#

tells u how bad mojang implemented the code for spawn area generating

final quail
#

Is it possible to get light level from an itemstack? Like how a torch is 14 and glowstone block is 15

full mist
final quail
#

When i googled it and stuff all i get is people trying to set a light level lol

frigid ember
#

k let me see chill

#

thats all i know

bitter palm
#

@full mist You should really stop spamming. Telling people to 'plz help' isn't gonna get you anywhere. It's just annoying tbh

frigid ember
#

@bitter palm you could try to get the value of Material

#

instead passing the Material object

#

just the string

#

and use the value of static function in Material

#

just a guess might work

#

Material.valueOf("STONE_BUTTON");

bitter palm
#

I'll try in a minute- on my phone

frigid ember
#

yo, I'm running into some weird problems

#

My server likes to crash when new people log on - I think it has something to do with chunks or the world

#

The world is 8000x8000 so it's rather large - the server will also crash nearly instantly if anyone teleports a long distance away

#

Currently running with GGServers and 3GB of RAM

#

I've had around 13 people on before with very little lag, even while worldediting - the server just likes to crash for reasons unknown

#

if it helps, the server is also notorious for failing to connect to an SQL database - while in a test environment though, this is not the case

upper hearth
#

I use GGServers and don't have these problems, so I think you can probably rule them out.
(They do have issues with their SQL databases though)

Have you checked your console logs? It usually prints why the server stopped.

#

Although I suppose one of their machines could be faulty.

frigid ember
#

might be - the server seems to encounter a gigantic lag spike, then crashes

upper hearth
#

Does everyone time out?

frigid ember
#

yep, times everyone out and the server crashes

potent creek
#

In a PlayerInteractEvent, how do I say "I handled this event, do not also fire this for the off hand"?

frigid ember
#

i wrote an InteractCooldown class which pauses every interaction by one tick

upper hearth
#

@frigid ember Sounds like something is blocking your main thread tbh

frigid ember
#

that might be just the thing

upper hearth
#

The console should print a MASSIVE stacktrace if that's the case

bitter palm
#

@frigid ember valueOf didn't make a different ;-;

frigid ember
#

i run sql asynchronously, but perhaps sql isn't the issue here

#

u sure u used it correctly

#

sometimes it inexplicably fails to connect

upper hearth
#

@bitter palm What are you trying to do

golden vault
#

Jeroen, iirc the event is fired for both hands before any plugins see them. You can check which hand and then only do your code on one of them.

bitter palm
#

In 1.13, my plugin places 3 buttons, however in 1.15, it doesn't work. No errors, but I just can't place any blocks/materials/BlockData with a facing attribute in 1.15

#

If I try to setType or setBlockData a button, door, sign or anything like that in 1.15, it just ignores that line of code it seems or something but works fine in 1.13

potent creek
#

Jeroen, iirc the event is fired for both hands before any plugins see them. You can check which hand and then only do your code on one of them.
@golden vault So I cannot mimic the vanilla behaviour of prioritising the main hand?

#

Or is there a way to get the cancelled status of the main hand from the off hand?

upper hearth
#

@bitter palm Try casting to Directional and then use setFacingDirection

bitter palm
#

What do you mean by casting to Directional

frigid ember
#

what is the supperclass of Directional

golden vault
#

what exactly are you doing?

upper hearth
potent creek
#

Me?

golden vault
#

ya

frigid ember
#

so the superclass is block

bitter palm
#

Alright I'll have a look

potent creek
#

I am adding custom behaviour to a compass, but when it's in the main hand, it still causes the player to use the off hand, for instance to eat etc.

#

I setCancelled(false)

frigid ember
#

nah its BlockData

#

extends BlockData

#

Directional blockdata = block.getBlockData();

#

should work

potent creek
#

Is the right course of action here to in the offhand event to check if the mainhand was cancelled or not?

#

Since I have no idea if that is possible, and emulating the behaviour without actually executing it could get complex...

golden vault
#

Honestly I am not sure if there is anything linking the two events that you could use

frigid ember
#

and u need to cast it too

bitter palm
#

Material.Directional.STONE_BUTTON doesn't resolve; what am I doing wrong?

frigid ember
#

wat

#

is that

#

Directional blockdata = (Directional) getServer().getWorld("world").getBlockAt(0, 0, 0).getBlockData();

#

here is example

bitter palm
#

so what would I change this to Material.STONE_BUTTON (I'm using a function that requires a Material object)

frigid ember
#

u can create blockdata

#

Directional blockdata = (Directional) getServer().createBlockData("minecraft:stone_button");

#

when ur done with the blockdata

#

u can set it to any block u want just use setBlockData

#

directional can set the face

bitter palm
#

Is it not possible to use a Material? Otherwise I'ma have to rewrite my fill script again ๐Ÿ˜‚

frigid ember
#

Directional blockdata = (Directional) getServer().createBlockData(Material.STONE_BUTTON);

#

this should work too

bitter palm
#

But that's a Directional object?

frigid ember
#

its an interface

#

for the blockdata class

potent creek
#

If I want no other plugin to handle the event that I handled, what is the right course of action?

frigid ember
#

basically

bitter palm
#

I don't quite understand ;-;

frigid ember
#

look at what methods it has

#

u can set the face

bitter palm
#

I know

#

but

#

Can I convert a Directional with a face into a Material

#

Because my fill function only accepts materials

frigid ember
#

Material is just one part of the block data

bitter palm
#

Ok so how do I use it..?

#

How would I change terrain.fill(-1,31,3,1,31,3,Material.STONE_BUTTON); into a directional?

frigid ember
#

that just passes the material

bitter palm
#

Exactly..?

#

so I need the material..?

frigid ember
#

that has nothing to do with directional

#

u have to pass BlockData

#

to use directional

bitter palm
#

Ok

frigid ember
#

Material is one thing

#

Directional is another

bitter palm
#

Right so I can't

#

I'll have to rewrite my fill script then ;-;

frigid ember
#

material only tells you if ur block is going to be oak or air

#

its not gonna tell u where its facing whether its opened or not

bitter palm
#

ikik

frigid ember
#

u use BlockData for that

bitter palm
#

If it's legit just BlockData that we're trying here

#

I already tried that

#

I'm confused ;-;

frigid ember
#

i dunno

bitter palm
#

terrain.fill(-1,31,3,1,31,3,"stone_button");

frigid ember
#

yeah but

#

bottom line here

#

is

#

there is a SELF face

#

and it seems to be not working

#

Directional allows you to set the face manaully

dense escarp
#

Hello how can i make mysql in ubunte 16

bitter palm
#

terrain.fill(-1,31,3,1,31,3,"stone_button[face=wall,facing=north]");?

frigid ember
#

thats why that dude mentioned it

#

k wait

#

minecraft:stone_button[face=wall,facing=north,powered=false]

#

put that as block data

#

and try it

bitter palm
#

but sure

#

Ok well I found the problem...

frigid ember
#

you should also try all the face to see if any work if faces are really the problem

#

wat is it

bitter palm
#

The problem is that I'm a blind idiot >.<

frigid ember
#

hmm

bitter palm
#

I moved to a new server cos the old one I was testing on had a few things messing with ticks and I couldn't be bothered to fix it

#

And I was still saving to the old server

frigid ember
#

k but is it placing buttons now

bitter palm
#

I really need to learn to debug things ;-;

#

yes...

frigid ember
#

so what actually fixed it

bitter palm
#

No need for facing, Directional, BlockData

#

All I needed to do was save the jar to the right server

frigid ember
#

so it was just the old server that had problems?

bitter palm
#

No. I was saving the plugin to a server called MMHM. I was loading a server called DeathSwap wondering why the features I added to the plugin I only added to MMHM wasn't working on DeathSwap, a server I didn't add the new jar to

golden vault
#

๐Ÿคฆโ€โ™‚๏ธ

bitter palm
#

It's me who has problems ;-;

golden vault
#

been there though

bitter palm
#

I've been here too many times to count when doing Python stuff

#

When will I learn? ;-;

#

I've legit been trying to make my plugin set these buttons since midnight BST. It's nearly 6AM now

frigid ember
#

is there a suicide emojy on this server?

#

oh wait

bitter palm
#

๐Ÿ˜„ ๐Ÿ”ซ

frigid ember
#

damn it cant embed

bitter palm
#

Yeh

#

๐ŸŒ‰ ๐Ÿค”

#

Ok should probably stop trying to get the best suicide emoji haha

#

Worst 6 hours of my life. 0/10 IGN

#

I should probably get some sleep. I was supposed to go to bed 7 hours ago...

frigid ember
#

ok nice

dense escarp
#

Hello how can i make mysql in ubunte 16 come dm

#

3$

solar magnet
#

is there a decent way to directly set nbt tags the same way you would in command line?

ripe spear
#

can u guys acces spigot mc

#

i cant it says bad getaw wy

#

bad getaway

frigid ember
#

๐Ÿ˜„

solar magnet
#

oh hold up I just got a 502 also

ripe spear
#

why is it happening

solar magnet
#

because the gateway is bad

ripe spear
#

i cannot access my plugins

#

wait

frigid ember
#

XD

#

Feels bad

#

But too ez

ripe spear
#

its working now

frigid ember
#

Not for long

#

๐Ÿ˜„

ripe spear
#

do u gus know a free rpg plugin

frigid ember
#

Enjoy

#

is down

#

@ripe spear

#

Try reloading page my little lover

ripe spear
#

are u kidding me

#

why today?

frigid ember
#

I luv you that is why

#

I luv everyone so I got to take MR.SPIGOT AWAY FORM THEM,

ripe spear
#

it works again

#

nooooooooooooooooooooooooooooooooooooooo

#

why

hallow surge
#

whats up with spigot rn

#

kinda annoying

frigid ember
#

Someone is hacking it

#

I wonder who

rotund lintel
#

CafeBabe doesn't like my forum username :I

hallow surge
#

who? who is hacking it? who would do such a thing!

#

xD

rotund lintel
#

Ah, yes. Indeed, such a mystery

#

I would say let's see who can get the most messed up webpage but I can't post images ;-;

#

Oh, it seems to be over

ripe spear