#help-archived

1 messages · Page 76 of 1

rotund lintel
#

Oh

#

I am confusion

ripe spear
#

now it works

#

bye i see it agin later i need to do the schooolwork they send me

latent rock
#

can someone recommend an OVH plan?

frigid ember
#

ye

latent rock
#

what else is out there then

keen compass
#

you could use OVH's DDoS protection along with Cloudflares

#

should provide you with decent protection most of the time

#

Basic DDoS protection is provided by OVH with all their servers, but if you lease a hardware firewall from them you get more control over it

#

it isn't everyday that someone has the capability to tear through two DDoS protection providers that are decent.

ripe spear
#

hi

frigid ember
#

lel

undone delta
#

Ich will ein spigot Plugin auf mein aternos Server kriegen wie geht das ? Bitte antworten

keen compass
#

Würde wahrscheinlich helfen, wenn Sie Englisch sprechen. In erster Linie spricht hier jeder Englisch.

hoary parcel
#

Sie

frigid heath
#

someone please

#

ah shit

#

need to verify

#

so i can send vid

#

time to make account

undone delta
#

Hello can someone help me? I want to upload a plugin from spigot to my aternos! How does it work?

#

Aternos Server

#

Pls help me fast

keen compass
#

otherwise you can't do it yourself if it isn't on the list

undone delta
#

Und wie tut man das drauf ?

keen compass
#

Ich bin mir nicht ganz sicher. Müsste Aternos kontaktieren und sie fragen.

ripe spear
#

u cant'

#

ask aternos in thgere discord

#

they will provide more detailed answer

#

@undone delta

frigid heath
#

bruh

#

can i just delete my account

chrome edge
#

Should I use json file or NBTTagComponent for my new schematic system. I'd want to save as a file but I've never use both for schematic. Do you guys have any idea?

#

As I know WorldEdit currently using nbt for schematic files but I'd like to know what the difference is.

frigid heath
#

depends on your priority

#

json is more readable

#

but probably slower to parse and also harder to use code-wise

#

nbt is smaller and the api should have parsing tools

chrome edge
#

I do not care readable. I've to get faster and minimize the file size of schematic.

frigid heath
#

then nbt it is

chrome edge
#

Thanks. I'll try it then give my opinion here.

heady jolt
#

In 1.12.2. If I open sign with a packet, does the client check if the sign is exist in the world?

chrome edge
#

@heady jolt Nope, it doesn't. So you can place the packet sign under the player and open it after the closing sign delete it.

heady jolt
#

Got it. In 1.15.2 it does.

tulip pendant
#

Can i know please

#

WHy those placeholders arent working

sturdy oar
#

missing expansions?

#

or plugins

#

also get off 1.13

tulip pendant
#

??

#

Wdym Get off 1.13

#

@sturdy oar

#

is 1.13 not good?

sturdy oar
#

of course it's not

tulip pendant
#

😦

sturdy oar
#

do you know 1.15.2 is out right?

tulip pendant
#

I hate that version

#

I love 1.12.2

#

and 1.13

#

Will you help me out transfer my server to 1.12

#

I need a hand

#

and whats wrong with it @sturdy oar

sturdy oar
#

no

#

I don't help people downgrading

tulip pendant
#

..

#

ok

#

Tell me whats wrong with it then

sturdy oar
#

ok:

tulip pendant
#

................................................../

tulip pendant
#

................................................../\................................................................

#

???

#

WHAT?

#

Why did you send me bug fixes???//

sturdy oar
#

because that's the reason you should update

tulip pendant
#

i asked whars wrong with my scoreboard ................................................./

#

I cant duhhh

sturdy oar
#

what plugin is the scoreboard using

#

as placeholder dependency

frigid ember
#

in all fairness

#

you should probably go back to 1.8

sturdy oar
#

???

#

i hope that's a joke

tulip pendant
#

im using PLaceHoldetAPI

sturdy oar
#

have you installed the required expansions?

tulip pendant
#

IDK

sturdy oar
#

is the scoreboard plugin made by you?

tulip pendant
#

I saw the dependecies

#

it told PAPU

#

PAPI

#

AND i have PAPI

sturdy oar
#

download the damn dependencies

#

/papi ecloud download Player

tulip pendant
#

i did it and it worked

#

but uptime isnt working

sturdy oar
#

/papi ecloud download Server

tulip pendant
#

Thx

sturdy oar
#

now update to 1.15.2

#

and ur cool

tulip pendant
#

why?

#

I get lag

#

in that version

#

and lot of plugins doesnt support 1.15

sturdy oar
#

🤷‍♂️ Well just so you know, many people here don't like supporting outdated servers

#

anyway have fun

tulip pendant
#

ok

#

..

keen compass
#

a lot of plugins also support 1.15

tulip pendant
#

Is there a better plugin Than worldguard that does the same

#

Bc worldguard is not working for some reason

#

and fawe and worldedit isnt working too

#

I HATE 1.13

sturdy oar
#

WorldGuard is perfect on 1.15.2

tulip pendant
#

Ooh

#

ok

sturdy oar
#

the build is stable, and many servers run it

tulip pendant
#

How do i upgrade?

#

will ya help me upgrade?

sturdy oar
#

first , make a backup

tulip pendant
#

how

#

Justcopy files right

sturdy oar
#

are you on Linux?

tulip pendant
#

Nope

#

Windows 10

#

Ima down grade to 1.12 cya

sturdy oar
#

just make a compressed copy of your server

tulip pendant
#

nope

sturdy oar
#

😂 wtf

tulip pendant
#

ima downgrade

sturdy oar
#

well bye

tulip pendant
#

ok

sturdy oar
#

you know you can't right

#

you'd have to delete the map

tulip pendant
#

What?

#

what map?

sturdy oar
#

you can't downgrade 1.13 map to 1.12

tulip pendant
#

wdym?

#

what map?

#

the worlds?

sturdy oar
#

yes

tulip pendant
#

i dont have any builds in my worlds lol

#

They are empty worlds just flat

sturdy oar
#

glhf

tulip pendant
#

glhf?

#

Whats glhf?

frigid ember
sturdy oar
#

Hydro

#

this is not Paper discord

tulip pendant
#

YA

#

This isnt paper

#

This is spigot lol

sturdy oar
#

also I think your spawns.yml may be corrupted or invalid

#

from Essentials

hollow thorn
#

how do i use the cartography table

#

in bukkit

tulip pendant
#

Someone help me downgrade my server pleae

#

please

#

...

#

using git..

hollow thorn
#

move the worlds and plugins

#

into a new server

idle zodiac
#

Well

#

I can't create a command now XD

#
    public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {

        if (!(sender instanceof Player)) {
            sender.sendMessage("This only works if it is run by a player!");
            return true;
        }

        Player player = (Player) sender;

        levelOneShop(player);
        return true;
    }```
#

For some reason this returns false or smth

#

because it prints the usage

#
version: "0.1"
author: OccyDaBoss
main: me.islimyocelotzbe.skyblock.Main

commands:
  island:
    usage: /<command> [create|recreate]
  shop:
    usage: /<command>```
is my plugin.yml
#

I'm using IntelliJ

#
    public void onEnable()
    {
        instance = this;

        // Initialise Commands
        this.getCommand("island").setExecutor(new Island());
        this.getCommand("shop").setExecutor(new Shop());

        for (World world : Bukkit.getWorlds())
        {
            new WorldCreator(world.getName()).createWorld();
        }
    }```
#

Here's my onEnable

oak stump
frigid ember
#

what if

#

the itemmeta is null?

idle zodiac
#

?

worldly heathBOT
#

Edit this to change the output of the command!

oak stump
#

the itemmeta is null?
@frigid ember true dat

#

so now it should work

#

nope

tulip pendant
#

GUYS HELP ME PLEASE

zenith token
tulip pendant
#

HeLP ME PLEASE GUYS!

#

PLEASE

zenith token
#

Use a different port

#

Change in server properties

idle zodiac
#

did anyone see my thing

#

idk wat is happrening

tulip pendant
#

which port?

idle zodiac
#

my brain

#

change 25525

#

to like

#

25526

#

or smth

zenith token
#

Chill man

#

might be a starter

tulip pendant
#

NO

idle zodiac
#

my brain

tulip pendant
#

players have to type it

idle zodiac
#

wat

#

players have to type it

#

yes

#

you need to port forward

tulip pendant
#

ok

#

If i portforard y=they dont have to type it right? @idle zodiac

idle zodiac
#

yes

tulip pendant
#

Thx1

#

thx!

idle zodiac
#

learn how to port forward before like trying to use spigot

#

XDDD

zenith token
slim hemlock
#

two questions, is it possible to add custom model data through the spigot API and if so is there a guide somehow explaining how it works?

#

I sort of noticed there's a set method for it but it takes an int value and that sort of eludes me

zenith token
#

Yea i saw that too

#

1.14.4 right !!

#

Yep possibile !!

silk bane
#

is there an API way to check the bungeecord option of the spigot config or do I have to read the file myself?

idle zodiac
#

helpe

#

ples

#

my brain hurts

zenith token
#

Ammmm a short note on what plugin you are working on

#

might give clarity

idle zodiac
#

Its skyblock

#

but thats besides the point

#

the command wont work

#

i'm returning true

#

wtf

frigid heath
#

firstly, and not at all related to your question, i dont think you should be rebuilding the entire gui every time someone types the command

#

make a static instance of it onEnable or something

idle zodiac
#

OK, but how do i have multiple levels then

#

so a level 1 shoip

#

a level 2 shop

#

etc

frigid heath
#

more instances probaby

#

probably*

idle zodiac
#

ah

#

ok

#

sorry iu;m truiie

#

d

#

tired

#

but then how do i get the player to open the inventory

#

alsoo

#

why is it returning false

#

its correct with plugin.yml

#

everything is synced with taht

#

i dont understand why it returns false

#

literally

#
    public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
/*
        if (!(sender instanceof Player)) {
            sender.sendMessage("This only works if it is run by a player!");
            return true;
        }

        Player player = (Player) sender;

        levelOneShop(player);
 */
        return true;
    }```
#

i'm returning true

frigid heath
#

oh you can keep the method just use a already designed StandardMenu

idle zodiac
#

btw i commented out the other shite to maake sure it weasnt my other code

#

o ok

wraith thicket
#

Why do you think you're returning false?

idle zodiac
#

it outputs the usage

#

nothing else

wraith thicket
#

Are you sure you have the same version of the plugin on your test server as you do in your IDE?

idle zodiac
#

yes

#

ofc

wraith thicket
#

Are you sure the specific onCommand method gets called? Perhaps another plugin is registering that command instead?

idle zodiac
#

i should think so...

#

i'm not sure thuoogh

#

it doesnt say anything

wraith thicket
#

Add some debug messages, i.e Bukkit.getLogger().info("in MY /shop command") as the very first thing in the onCommand method to see if it gets called

idle zodiac
#

ok

#

nothing

#

just the usage

wraith thicket
#

Therefore the method never gets run. So you're either using another command or another plugin has registered this command instead of yours

#

Or, of course, it's another version of your plugin.

idle zodiac
#

i have 2 commands

#

Island and Shop

wraith thicket
#

This could happen if you have multiple jars of the same plugin in your plugins folder

idle zodiac
#

but they are in 2 separate files

#

Let me rename the command

#

see if that fixed it

#

the other command works

#

its just the shop one

#

ok so I renamed the command

#

and it didnt work

oak stump
#

anyone know how to like do stuff when a player equips armour without an api

idle zodiac
#

why without an api?

wraith thicket
#

What does "it doesn't work" mean? Do you get the same result as before? Did it register the new name of the command or did you use the old?

idle zodiac
#

i registered the new name

#

it just printed the usage

#

i dont think onCommand is running

#

tyf

#

tf

wraith thicket
#

@oak stump ArmorEquipEvent is open source - just replicate whatever it's doing

#

hjonk - after you changed the name of the command, did you use the new name of the command or the old one?

idle zodiac
#

i used the new one

#

/shopaaa

#

also

#

i forgot to change my name

#

XD

#

better

#

@idle zodiac

#

much better

wraith thicket
#

When you changed the name of the command, did you change it both in plugin.yml as well as where you're setting the executor?

oak stump
#

@oak stump ArmorEquipEvent is open source - just replicate whatever it's doing
tried that but the event doest fire

idle zodiac
#

yes ofc

#

i had this issue before when creating my first command

#

and i forgot how i fixed it XDDD

wraith thicket
#

Symbolizm - I'm fairly certain it works with the API so you must have made a mistake when implementing it.

#

Occy - are you sure you don't have an exception when the plugin is loading up?

idle zodiac
#

let's see

#

AAAHHH

wraith thicket
#

I.e one during the initiailizing of the island command would mean it'd never get to initializing the shop command

idle zodiac
#

okok

#

so

#

its the menu interface

#

noclassdeferror?!

#

let me try rearranging my dependencies XX

wraith thicket
#

Is it an external dependency or within another plugin on your server?

idle zodiac
#

no

#

its my plugin

#

better

wraith thicket
#

Check your jar - most likely the specified class is not in there

idle zodiac
#

ok

frigid ember
#

You can cancel all tasks for your plugin or a taskid

#

getScheduler().cancelTask() or something like that

wraith thicket
hollow thorn
#

how do i use the cartography table
in bukkit

hollow thorn
#

how do i create a map

#

with the centre

#

at the player

#

and then put it

#

in the

#

cartography

#

table

vernal spruce
#

hmm how would i be able to use a runnable to also return a bool?

hollow thorn
#

which slot do i use

#

for the cartography table

wraith thicket
#

If I were to try, I'd try 0. But your guess is as good as mine

tulip pendant
#

Can someone help me setup mysql

wraith thicket
#

Stellrow - I would use CompletableFuture instead. Or you could create a custom runnable implementation and pass a consumer as well that consumes the boolean

tulip pendant
#

Can someone help me setup mysqlpld

#

Please someone help me setup dynmap it requires mysql

idle zodiac
#

OK so IMenuButton is there

#

but apparently it's not foud

#

@wraith thicket

wraith thicket
#

Are you hotswapping your plugin?

idle zodiac
#

?

worldly heathBOT
#

Edit this to change the output of the command!

wraith thicket
#

I.e changing the jar while the server is running

idle zodiac
#

yes

#

but then i do /reload

wraith thicket
#

Then that's why

idle zodiac
#

time to do /restart

#

nope

#

its not there apparently

tulip pendant
#

Can someone help me setup mysql please

idle zodiac
#

time to change apis

tulip pendant
#

Please

#

Someone

idle zodiac
vernal spruce
#

well how bad will this affect performance? ```private void checkSameSpawnerInChunk(ItemStack spawner,Location blockLocation){
new BukkitRunnable(){
ChunkSnapshot targetChunk = blockLocation.getChunk().getChunkSnapshot();
@Override
public void run() {
for(int x = 0;x<16;x++){
for(int z = 0;z<16;z++){
for(int y = 0;y<255;y++){
if(targetChunk.getBlockType(x,y,z)==Material.SPAWNER){
int cx = targetChunk.getX();
int cz = targetChunk.getZ();
checkMerge(spawner, blockLocation.getChunk().getBlock(x,y,z),blockLocation.getBlock());
}
}
}

            }
            this.cancel();

        }
    }.runTaskAsynchronously(pl);
}
wraith thicket
#

@tulip pendant You don't need to use MySQL for dynmap - you can also use stuff like SQLite (which doesn't require any setup)

tulip pendant
#

Rlly

#

Great

#

How?

tulip pendant
#

How do I link dynmap to sqlite

#

@wraith thicket

wraith thicket
#

Look at the link ...

#

It's describing these things rather well

tulip pendant
#

Ok

#

Any tut

#

So I can understand better

wraith thicket
#

Stellrow - it depends on how often you you run this. There is some overhead in creating the actual snapshot. But I'd say it's most likely better for performance to do it the way you're doing it

#

@tulip pendant

storage:
  # SQLite db for map storage (uses dbfile as storage location)
  type: sqlite
  dbfile: dynmap.db
tulip pendant
#

Can you help me

wraith thicket
#

The link is quite clear on this, though ...

tulip pendant
#

Im new with this stuff please

#

please ford

#

in dms

vernal spruce
#

@wraith thicket it will be when placing a spawner wont run that often..

#

Also anyone has a list of all mobs who dont have an egg spawn?

#

nvm i tinkered something wich should do it

wraith thicket
#

I'm fairly certain that's heavily dependent on your version. They keep adding new eggs for mobs they forgot to add them in the last version.
But you should get a rough idea by looking at Material and EntityType enums

vernal spruce
#
        try{
            Material.valueOf(type.toString().toUpperCase()+"_SPAWN_EGG");
        }catch(IllegalArgumentException ex){
            return true;
        }

        return false;
    }```
#

would this do the job as well?

#

that useless uppercase btw

wraith thicket
#

It's pretty much the same thing, only automatic. It will most likely work most of the time, but I don't know if all the names are set up the same in both enums

tulip pendant
#

ford

#

after starting what do i do?

wraith thicket
#

I'd also use Enum#name instead - toString might be overwritten in other ways (it's not for EntityType I don't believe)

vernal spruce
#

hmm good point

frigid ember
#

@vernal spruce there are some concerns i have with that code

#

i might not work to run the task async

vernal spruce
#

it already works

frigid ember
#

and if u did manage to run the task async as long as there are not 100 of async tasks running at the same should be fine

vernal spruce
#

not gonna loop thousands of blocks

#

on main thread

frigid ember
#

also

#

its

#

for(int y = 0;y<255;y++)

#

256

#

not 255

vernal spruce
#

i saw i already changed

frigid ember
#

also the height might change

#

so might want to use

#

maxheight method

#

from the world

#

thats just assuming its 256

vernal spruce
#

well it was this for 10 years

#

i strongly doubt it will ever change

frigid ember
#

k

#

u could also use

#

ChunkData

#

not sure if chunksnapshot works all the time

hollow thorn
#

max-build-height=256

frigid ember
#

nvm not sure if thats what you actually need

hollow thorn
#

the server file

vernal spruce
#

i think minecraft still forces it

#

to 256

#

no matter what you set

hollow thorn
#

oh so if i set it to 1

#

it would be 1

#

but if i set it to

#

9999999999999

#

it would be 256

vernal spruce
#

most likely yeah

frigid ember
#

there is probably input validation

#

on the value that allows specific range of values

vernal spruce
#

Maximum height reachable by /teleport or /tp. 256 wiki says this

#

it says a defined amount rather than "based off server value"

#

idk might be better to use max height who knows..

wraith grail
#

Is adding a firework star the same as doing
rocketmeta.setPower(int);
?

vernal spruce
#

look in the docs to see what is says

wraith grail
#

Seems to mention flight time, I'll just have to try then with different values and see if it makes any damage difference.

marsh hawk
#

Has anyone here ever messed around with Web Sockets? I've managed to get a server running talking from my Java discord bot to my plugin but i also want to make it so my website can communicate through js. But afaik it doesnt use the same protocol?

vernal spruce
#

it also says flight time=how high does it reach

wraith grail
#

Yhea. I'm gonna add it as a charged item to a crossbow and give it to a npc. It mentions that every additional firework star increases the damage it does.
Up to 7 for a total of 11 damage.

vernal spruce
#

if you look for the big/small thing from gunpowder effect

zenith token
#

Hey

sturdy oar
#

ehy

#

can someone link me the Spigot Obfuscation guidelines

wanton delta
#

Its not worth it tbh

sturdy oar
#

🤷‍♂️

old elk
#

I have been looking for YT tutorials and stuff and I can find some but they don't really help me much can someone help me or if not link me a video showing how to setup luckperms with bungee cord so that all the perms sync through servers because the 1s I can find dont rly show how to do it they just give a general description of how to.

sturdy oar
#

read the documentation

#

everything's there

old elk
#

idk where that is

#

i have never used luckperms before i always used pex

sturdy oar
#

you need a database

#

such as MariaDB, PostgresSQL etc...

hollow thorn
#

how do i make infinite elytra

#

flight

sturdy oar
#

unbreakable attribute

hollow thorn
#

no as in you do not loose

#

velocity

#

and dont need rockets

#

to move

sturdy oar
#

are you making a plugin?

hollow thorn
#

good point

#

but if it cant be done with

#

cmds

sturdy oar
#

I don't think so

hollow thorn
#

then i will turn to plugins

old elk
#

there are hack clients from 2b2t that do that

sturdy oar
#

he's not looking for hacks -.-

old elk
#

ik i just saw ppl on there flying like that idk why i said it

#

but i have 1 more question do i need to install luckperms on all my servers or will mysql auto link them ive never used it before

wraith thicket
#

QBINyt - if you want a plugin to work on your server, you need to have it on there...

#

A database is not a plugin

old elk
#

yeah I know i mean do i need to link luckperms to a mysql on every server or do i link them all to 1

sturdy oar
#

you need all backends and proxy to be linked to the same DB

wraith thicket
#

I would have thought the above mentioned wiki article would have mentioned those things

old elk
#

idk what that means Fendi sry i have never used bungee luckperms or mysql

sturdy oar
#

I would have thought the above mentioned wiki article would have mentioned those things
@wraith thicket it does

old elk
#

imma just try to find a step by step tutorial on yt every one that i lookup tho doesnt rly show anything

marsh hawk
#

Anyone have experience with maven? I'm getting this error java.lang.NoClassDefFoundError: org/java_websocket/server/WebSocketServer For no apparent reason. I've tried to use the jar instead of the pom.xml stuff and im getting the same error

vernal spruce
#

well no method found with that name

#

most likely the dependency is wrong

marsh hawk
wanton delta
#

Are you shading it

marsh hawk
#

sorry I'm new to maven i have no clue what that is

tiny dagger
#

Adding the classes inside your jar

wanton delta
#

Most likely aren’t

#

Show us your pom

marsh hawk
nimble marten
#

Hey everyone!
I have a question. Im trying to set up a minigames server that handles all minigames on there.

I have a lobby server that everyone would connect to and it would send them to a specific world on the target server. Does anyone know if that is possible?

vernal spruce
#

why wouldnt it be possible

molten whale
#

Do you want a plugin? Or you are wanting to make one?

wanton delta
#

Does buooboo need the shade plugin

#

I forget

#

@marsh hawk add <scope>compile</scope> to the bottom of your websocket dependency

#

Also why are you compiling citizens API? That should be its own plugin no?

hollow thorn
#

how do i make infinite elytra
flight

marsh hawk
#

Uh idk, i thought this was just an alternative to using the jar

#

it works

tiny dagger
#

Is a cycle dependency considered normal for nms versions modules? 🤔

nimble marten
#

@vernal spruce @molten whale
Im asking if anyone knows how to do it.
From what I know, you would have to send a command that sends the player to the target server and switches worlds, but I am just not sure what plugins to use to do that.

example:

  1. Player on lobby server clicks on MInigame1 NPC in a lobby server.
  2. Player gets sent to a multiarena Minigames server, and to a specific world on there.

I know that multiverse handles world switching but im not sure how i would do that over bungeecord

vernal spruce
#

not into bungee tbh,but it would be among the lines of send a tunnel message and the plugin capturing that and doing things..

#

ive yet to touch bungee so far

molten whale
#

I think it would be easier to make the lobby (or the minigame selector) on the multiarena server.

#

For sure you have to send information from the lobby to the multiarena server somehow..

nimble marten
#

I was thinking that too, handling that would be too compicated.
I mean its just a server for me and my friends (and their cousins) to play minigames and survival with us.

vernal spruce
#

heard its quite simple you should look into some tutorials we have on the forums

nimble marten
#

Since im not the most experienced (and if I absolutely had to keep bungeecord), I could use a bungeecord warp plugin.

When a player clicks on the NPC, they get sent to the warp via a command executed when they interact with it.

frigid ember
#

about that string comparison

#

i checked the strings

#

apparently the same strings dont equal to each other

#

minecraft:bedrock != minecraft:bedrock

#

what is it doing

molten whale
frigid ember
#

i used matches it seems to have worked

#

but it saves improperly

#

cause the if expression evaluates to the wrong bool values

quasi rapids
#

What are some good bedwars plugins that work with citizens?

nimble marten
#

@molten whale I just looked at that. I will use CommandNPCS (https://www.spigotmc.org/resources/commandnpc.40295/) to handle the switching.

I also might follow your advice and have the Lobby and minigame servers be shared, since its a small server for friends and family (of friends).

molten whale
#

@quasi rapids With "work with citizens" what do you mean?

#

Ohh, normal Citizens can already execute commands when a npc is right clicked.... So you dont really need an extra plugin

nimble marten
#

Ohh, normal Citizens can already execute commands when a npc is right clicked...
@molten whale
Got it. then i probably wont need that plugin.
Thank you so much!! md_5

molten whale
tiny dagger
#

@frigid ember don't use == for strings, use.equals

#

Strings can be 2 different objects so check their insides with .equals

quasi rapids
#

Well, I have the premium bedwars plugin. I want an npc that shows how many players are playing like, solo, duos, 3v3v3v3, etc.

#

And, it tp's you into a round when you click.

quasi rapids
#

Thanks!

frigid ember
#

i used equals

#

but it still gives wrong comparisons sometimes

#

ultimately the code is pretty simple

#

get the current block in the loop

#

check if the block from the previous looping is the same

#

so if 0 0 0 = bedrock and 0 0 1 = stone

#

the if should work

#

and save minecraft:bedrock 0;0

#

then the start coords for the next block are 0 0 1

#

gets the next block checks if its stone or not

#

if its not then saved minecraf:stone 1;1

tiny dagger
#

What do you wanna do? 🤔

#

Maybe I can help

frigid ember
#

i am pretty sure the equals is messing it up

#

and i dont know how to fix it

frigid pumice
#

and posting the code you are using could be usefull too

tiny dagger
#

You could use the Material enum

#

But I'm not sure what you wanna do exactly

frigid ember
#

and then when i restore

#

i split 1;1

#

for example

#

divide

#

1 / 256 = 0

tiny dagger
#

You're stacking blocks?

#

Oh

#

For dividing

#

You need to have at least 1 double/float

#

Like this 1/256d would yeld a double

#

Otherwise 2 ints would give back an int

frigid ember
#

yeah so

#

1 / 256 = 0

#

then

#

remainder = 1

#

1 / 16 = 0

#

remainder = 1

#

0 0 1

#

what we want

#

minecraft:stone 1;1

#

the first 1 indicated the start

#

the second one indicated the end

#

it could be minecraft:stone 1;23

#

23 /256 = 0

frigid pumice
#

and what exactly is your problem?

frigid ember
#

remaider = 23

#

23 / 16 = 1

wanton delta
#

Do you want the remainder?

frigid ember
#

remainader = 7

#

0 1 7

#

= 23

wanton delta
#

N % X = remainder

#

What are you asking

#

You’re saying nonsense

frigid ember
#

im trying to figure out

#

why equals

#

is not flipping returning the correct value

#

i know my code works cause it checked 1000 times now

wanton delta
#

What is your code

keen compass
#

?paste

worldly heathBOT
wanton delta
#

Please use paste no more screenshots

keen compass
#

while you might have checked your code 1000 times, you have yet to let us check it 1000 times to ensure what you know is actually correct 😛

marsh nova
#

equals(Object) ≠ ==

wanton delta
#

@frigid ember

frigid ember
#

sorry i was checking

#

yeah ur the guy that helped me yesterday

wanton delta
#

Mhm

frigid ember
#

same code but used BlockData object instead kind of

keen compass
#

Well, today there is more people to help you 😄

pure canopy
#

alguien me dice como configurar el {0} de kits =\ u00a74\u00a7lDEMON\ u00a78 >>\ u00A77Kits disponibles\: {0}

keen compass
#

we don't generally save other people's code just fyi

pure canopy
#

sorry

frigid ember
#

yeah

#

i will send it again

pure canopy
#

someone tell me how to configure the {0} of kits =\ u00a74\u00a7lDEMON\ u00a78 >>\ u00A77Kits available \: {0}

#

by essentials

wanton delta
#

I think essentials has their own discord

pure canopy
#

yes ?

wanton delta
#

|| pienso que essentials tiene un discord de atuda, usalo||

frigid ember
#

changed a bit

#

so currently the way it is

#

it partially works

pure canopy
#

@Martoph#7369 me lo pasas ?

wanton delta
#

So you’re still converting blockdata to strings

frigid ember
#

yeah its going to have to be done at some point

#

if i use matches same result

wanton delta
#

@pure canopy

frigid ember
#

il check again

#

but

#

yeah

pure canopy
#

graciaas

marsh nova
#

that's the perfect place to use map.compute instead of containsKey + put

wanton delta
#

^^^

#

But also I’m still a little bit confused about your end goal

#

Why are you comparing block data

frigid ember
#

i am comparing to see if the next block is different from the previous block

#

and save its coordinates

#

from the start to end

wanton delta
#

Have you used Block.getType?

frigid ember
#

no it needs to be the block data

#

because u may have blocks with different block data that are the same type

wanton delta
#

Mhm

#

So

#

What is causing you trouble specifically

#

What isn’t working

frigid ember
#

so basically

#

blockdata uniquely identifies a block

#

not the material it self

#

the equals part

#

not evaluating correct true and false values

wanton delta
#

Well equals is doing its job

#

What is it outputting in console

frigid ember
#

and that uses matches

#

same result with equals

keen compass
#

instead of getting the blockdata as a string

#

why not do an equals check on the blockdata object

frigid ember
#

k

wanton delta
#

Well equal’s is doing its job

frigid ember
#

not all the time

#

its not saving all the blocks

wanton delta
#

Well look at console

frigid ember
#

it seems like its working

wanton delta
#

You look at all the pairs

frigid ember
#

but not for all of the blocks

#

i figured it out last time

#

but then i updated the optimizations

#

and it stopped working

#

last time it saved minecraft:stone 0 0 0 0 1 6

#

forexample

#

and then i run a loop on those coords

wanton delta
#

I noticed you are using underscores for variable names

#

Dont do that

frigid ember
#

wat

#

that has nothing to do with the problem its just names

wanton delta
#

I know

frigid ember
#

of variables

wanton delta
#

But im just telling you now

#

You shouldn’t do that

frigid ember
#

i dont like using capitals

#

its annoying

#

in order for to have worked i have to use current_blockdata != last

#

but that was before i updated the code

#

now it does not work

#

weird because i did not touch those lines of code

#

i removed completly different things

wanton delta
#

string != string will always return true

#

Whats this coords data thing

hollow thorn
#

how do i edit my resources

frigid ember
#

thats the thing i updated

#

just multiplies the y x z value

#

to give me a value between 0 and 65536

#

and then when i read from the file i convert it back to x y z

wanton delta
#

Not sure how that would work but ok

#

Im still just unsure of the result youre expecting and the result youre getting

frigid ember
#

so if i have 5 5 5 as y x z

#

i multiply 5 * 256 + 5 * 16 + 5

#

to give me the value

wanton delta
#

Dont you mean 5*265 + 5*16 + 5

frigid ember
#

k so that is : 1365

wanton delta
#

Im not sure how you convert that back into 5 5 5

frigid ember
#

yeah took a bit to figure it out

#

but its possible

wanton delta
#

explain im curious

frigid ember
#

ok so far we have 1365 = 5 * 265 + 5 * 16 + 5

#

to convert back

#

i do

#

1365 / 256

#

to get the y value

#

i get the INT of that division

#

so y = 5

keen compass
#

why different numbers for each coord o.O

#

in fact, why not just get the ints and combine them together

frigid ember
#

remainder = 1365 - 256 * 3 = 597

#

to get x i do

#

wait

wanton delta
#

And youre sure that integer is different for every single possible coordinate?

frigid ember
#

wait so the remainder is actually

#

1365 - 1280 = 85

#

k so i do 85 / 16

#

INT = 5

#

MOD = 85 - 80

keen compass
#

too confusing

frigid ember
#

85 - 80 = 5

keen compass
#

suggest a more simpler approach XD

frigid ember
#

so we got 5 5 5

keen compass
#

like just serialize the data or something

frigid ember
#

its actually pretty e let me condense it

keen compass
#

could even just base64 the coords

frigid ember
#

1365 / 256

#

INT = 5

#

MOD = 85

#

85 / 16

#

INT = 5

#

MOD = 5

#

done

#

5 5 5

keen compass
#

or just serialize the coords and then deserialize the coords and voila you have coords with no math involved

frigid ember
#

do you understand?

wanton delta
#

I get it

#

But it feels wrong

frigid ember
#

its pretty cool right

keen compass
#

not really no

wanton delta
#

No

frigid ember
#

basic math

keen compass
#

just a complex system for no reason

frigid ember
#

wdym

#

its basic modulus use

keen compass
#

why go through all the trouble of doing that with the coords to begin wtih?

wanton delta
#

Just use “X,Y,Z” then parse that string

frigid ember
#

so that i dont have save them one after another

wanton delta
#

If youre saving in a file

frigid ember
#

uses up alot of disk space

keen compass
#

then just serialize your data

wanton delta
#

Not really no

frigid ember
#

i dont know what that is

#

i am new to java

#

one chunk uses around 70MB

wanton delta
#

9 bytes of data

#

So youd need

frigid ember
#

if i save block by block and its coords

keen compass
#

I can tell. I just base64 my location objects when I save them so it is easier to retrieve them and restore the location object

wanton delta
#

111 coordinates for 1kb

#

111,111,111 coordinates for a mb

keen compass
#

also, because I do that it saves space, not that it would take that much anyways

wanton delta
#

^

frigid ember
#

what way do you do it

#

that uses little space

wanton delta
#

There needs to be a name for programmers that overly concern about space/speed

keen compass
#

I use base64 encoding on the location object

wanton delta
#

My way uses little space

hollow thorn
#

I accidently posted

#

a resource

frigid ember
#

wdym

hollow thorn
#

in the bunjee area

#

and its not bunjee

wanton delta
#

Just use “X,Y,Z” then parse that string
@wanton delta

ancient ridge
#

report it to get it moved/deleted

hollow thorn
#

so how do i move it

frigid ember
#

just expalin ur self instead of bragging about whos better

keen compass
#

get the location data, then run it through a base64 encoder and it turns it into a long string of numbers and letters

wanton delta
#

Not even that

#

Just save the 3 coords with commas in between

#

Easy to read

#

Isnt a giant string

frigid ember
#

NO!

wanton delta
#

why not lmao

keen compass
#

o.O

frigid ember
#

there are 65536 blocks in a chunk

#

i will save around 50 chunks

#

calculate IT

wanton delta
#

Yea

frigid ember
#

M8

keen compass
#

so just save the chunk coords instead?

ancient ridge
#

angery person

frigid ember
#

65536 lines in a file

keen compass
#

you do realize that chunks have coords too?

harsh anvil
#

tf is happening here

keen compass
#

not just blocks?

ancient ridge
#

some crazy person, DED

frigid ember
#

wait so your saying that saving each block and its coords wont use too much space

#

is that what ur saying

keen compass
#

Another new person who needs help, but they insist on using some complex way to store data but their system isn't doing what they want it to @harsh anvil

harsh anvil
#

ah yes the classic xy problem

ancient ridge
#

.xy

harsh anvil
#

@frigid ember what are you trying to achieve?

ancient ridge
#

darn where's the bots when you need em

frigid ember
#

nevermind il figure it out

harsh anvil
#

ok then ¯_(ツ)_/¯

frigid ember
#

i did not come here to argue whos way is better

wanton delta
#

Saving every single block in a chunk

frigid ember
#

jesus

wanton delta
#

This sounds like you need to take advantage of region files

#

And chunk sectors

frigid ember
#

i have no idea how to use region files

harsh anvil
#

why would you do the work twice? they're already stored on the server (in the region files)

frigid ember
#

i know

#

i have no idea how to use the world region files

wanton delta
#

You should research them

harsh anvil
#

tell me your goal, what are you trying to achieve

#

that you need to store entire chunks

wanton delta
#

They’re the most compact way to store chunk data

frigid ember
#

so im assuming a region stores a bunch of chunks

harsh anvil
#

telling us your attempted solution doesnt help us

idle zodiac
#

I'm trying to make the buy menu display the item the player is buying although my theory doesn't work. Any Suggestions?
Btw I'm using if / else if instead of a switch because of the block variants.
https://hastebin.com/lozazewoke.java
I declared objectToBuy and price at the top of the class.

wanton delta
#

Region files store an area of 16x16 chunks

#

Reading its byte code will allow you to read certain chunks

keen compass
#

region files store 1024x1024 chunks

wanton delta
#

....u sure?

keen compass
#

yes

wanton delta
#

Nope

#

Its 32x32

frigid ember
#

so how do i create a region file

#

using the spigot api

wanton delta
harsh anvil
#

you dont, the server does it

#

you just read it

wanton delta
#

Why do you need to create one?

frigid ember
#

how would i save a bunch of chunks in a region file

harsh anvil
#

we still havent got the slightest clue what you're trying to do

frigid ember
#

and read from them

#

i just want to store chunkdata

#

to a file because i dont want to use memory up

harsh anvil
#

ok but why

frigid ember
#

so that i can use it to restore the chunks back to the state they were saved

harsh anvil
#

you dont need to store the entire chunk, you just need to store whats been altered

wanton delta
#

You could make backups of region files

frigid ember
#

good idea but how would i know what has been changed

harsh anvil
#

events

frigid ember
#

100% knowing

#

nope

#

what about world edit

ancient ridge
#

😂

keen compass
#

@wanton delta my bad I remembered it incorrectly, it stores 32x32 chunks, but stores 1024 locations lol

wanton delta
#

Yes

frigid ember
#

or what if the data gets lost some how

harsh anvil
#

then thats not your problem really

frigid ember
#

if i save the chunks to a region i will have every block

harsh anvil
#

i assume you're trying to make something like core protect?

frigid ember
#

at all times

#

and its much more robust

keen compass
#

I mean that is exactly what the server does already

harsh anvil
#

yes but you'll also use twice the storage

frigid ember
#

thats why im trying to find a way to save the chunks so that they dont use too much space

wanton delta
#

I think he wants to be able to revert specific chunks at will

frigid ember
#

i dont care if it uses like 10MB

#

or something like that

harsh anvil
#

they will use space regardless

wanton delta
#

Which involved decoding and altering region files at will

harsh anvil
#

world files easily go up to a few gigabytes

frigid ember
#

yes if the border is not set

#

and it keeps generating

#

i can control that

harsh anvil
#

well if you can control that, why cant you control what files stay and which get deleted?

#

you dont need a copy of the region files if you take regular backups

frigid ember
#

i am creating a plugin

#

do you know what SkyWars is

#

Hello!

I've been having a constant issue with my AvatarCreatures plugin that causes Ravagers to not rotate while in motion. I have it explained in detail here: https://trello.com/c/OKbAdMda

If you happen to find a possible solution, please DM me, comment on the Trello board, or send me a ping here 🙂

Thanks!

#

i am figuring out how to restore chunks after the game ends

wanton delta
#

Ahhhh

#

What you do is

#

Save the world folder in a zip somwhere

#

And unzip it when game starts

#

Delete that folder when game ends

keen compass
#

^

frigid ember
#

wat

keen compass
#

although I probably wouldn't use any archiving

frigid ember
#

i need to unload and load the world

wanton delta
#

Yea

keen compass
#

I would just keep a copy of a master world

frigid ember
#

well building on top of that

keen compass
#

delete the one that ended, copy from master to new fresh world

frigid ember
#

i actually had a solution similar to that

#

what i did was

wanton delta
#

Archive to compress it a bit personal preference

frigid ember
#

disable auto saving

#

and unload the chunks when the game ends

#

BUT

#

1.15 unloadChunk did not work

wanton delta
#

You dont want to do that

frigid ember
#

so

wanton delta
#

You keep a copy of the master world

frigid ember
#

when i say unloadChunk

wanton delta
#

Copy/delete

frigid ember
#

i dont mean unload and save the chunk

#

which is what it does

#

misleading naming

wanton delta
#

You cant change worlds at will while theyre loaded

#

Becuse rheyre stored in ram

keen compass
#

just kick everyone from that world, move them to lobby world or server. Reset the world by deleting it and then copying from master. Voila world is now reset. You can use archiving if you want, up to you since space seems to be a concern of yours.

wanton delta
#

And you risk corrupting the world

harsh anvil
#

pretty sure any self respecting server does it the way Frostalf stated

frigid ember
#

i dont know i will see what to do

#

many options

#

which one to choose

wanton delta
#

We just told you what to do

#

I think theres only 1 viable option

frigid ember
#

the zip thing

#

?

harsh anvil
#

yes

wanton delta
#

Zip the world if you want to compress it

#

Its personal preference

frigid ember
#

dunno seems alot of work

wanton delta
#

Dont have to

#

Youre making a minigame

worldly heathBOT
#

Edit this to change the output of the command!

wanton delta
#

Ffs

harsh anvil
#

a lot less work than reading region files

frigid ember
#

everything else is basically done

#

i just been stuck on chunkunloading

wanton delta
#

Dont come here if you want to be lazy

#

Lazyness is how you develop bad plugins

frigid ember
#

i am being lazy

sturdy oar
#

-.-

frigid ember
#

i started this last year

wanton delta
#

Good for you

#

We just gave you a solution

#

You can unzip, copy and delete, literally 1 extra step

#

Or just copy and delete

frigid ember
#

what i meant to say is actually i am taking the time

#

the figure problems out

#

lol

#

anyway

#

too long

#

bye now

wanton delta
#

If you come back tomorrow with the same method youre doing now youre not gonna get help

#

Just as an fyi

frigid ember
#

k why not

#

just curious

harsh anvil
#

cuz you're ignoring our help anyway

#

why even bother asking then

frigid ember
#

not really ignoring more like not fully understanding

#

why i need to copy the whole world

#

zip it or whatever

wanton delta
#

Because saving locations in a file is 10000x as inefficient

#

And youll find itll be less code to copy and paste

charred current
#

Could anyone lend me a hand? currently creating a bungee network. Created it fine and can connect fine using vanilla clients. However when i try to connect with a modpack i get Invalid payload REGISTER!
anyone know of a fix?

wanton delta
#

We dont support mods

charred current
#

i'm trying to connect to a vanilla server on a modpack client?

wanton delta
#

Correct

#

Youre issue is with the modpack

#

Not bungee or spigot

charred current
#

okie thanks!

hallow surge
#

why would anyone play your server with a full fledged modpack?

charred current
#

its not a playable server. its just the hub lol

frigid ember
#

in order to reload a world

#

it needs to be unloaded and created again

wanton delta
#

Yes

naive goblet
#

Unload and load only?

frigid ember
#

and i think that will hang the server main thread

wanton delta
#

You need to use bukkit to unload the world

frigid ember
#

cause thats what it usually does when creating a new world

wanton delta
#

Delete the folder

#

Copy the new world

frigid ember
#

imagine if u get lag spikes why playing skywars

wanton delta
#

Load the world

#

Server shouldnt hang?

#

When are you unloading the world?

frigid ember
#

will it hang the main thread?

naive goblet
#

depends if its async etc

keen compass
#

You wouldn't be creating a world

frigid ember
#

when creating it again

wanton delta
#

Youre not creating a world

keen compass
#

you would be copying an existing world and then loading that copied world

wanton delta
#

Youre just loading it

keen compass
#

loading a world will not hang the server, literally the only chunks that get loaded is just around the spawn and that is if you have it configured to keep the spawn loaded.

frigid ember
#

and why cant just disable auto save and unload and create the world

#

is that not gonna be better?

wanton delta
#

No

keen compass
#

you will want auto-save to be disabled anyways

frigid ember
#

why though

wanton delta
#

Youre not making sense

frigid ember
#

wdym

#

disable auto save on the arena

#

when u load

wanton delta
#

We are telling you to unload the world then delete it

frigid ember
#

then it wont save the chunks