#help-archived

1 messages ยท Page 197 of 1

bronze acorn
#

section

#

right.. there..

tacit trellis
#

how can I use them to prevent piracy

sturdy oar
#

you plugin is going to get cracked anyway ๐Ÿคทโ€โ™‚๏ธ

grim halo
#

You cant prevent it. Just deter.

tacit trellis
#

yes but it might help so I would like to know

cold wharf
#

Is it okay if I talk about MongoDB here?

spring arch
#

yes

grim halo
#

Read the page and you will know

#

?ask

worldly heathBOT
#

If you have a question, please just ask it. Don't look for staff or topic experts. Don't ask to ask or ask if people are awake or available. Just ask the question to the channel straight out, and wait patiently for a reply.

bronze acorn
#

would you guys know how developers have like

#

license keys

cold wharf
#

I am trying to connect to MongoDB but the MongoClientURI just doesn't work for me idk why

bronze acorn
#

do they use get methods to see if the license key is valid

#

make sure you have the mongo dependency added

cold wharf
#

make sure you have the mongo dependency added
@bronze acorn I have added them

bronze acorn
#
<!-- https://mvnrepository.com/artifact/org.mongodb/mongo-java-driver -->
<dependency>
    <groupId>org.mongodb</groupId>
    <artifactId>mongo-java-driver</artifactId>
    <version>3.12.6</version>
</dependency>
grim halo
#

@cold wharf Do you have the req dependencies`?

bronze acorn
#

then reimport with maven

cold wharf
#

yes

bronze acorn
#

reimport maven

#

and import the class

dusky sigil
#

still says 0

#

doesnt fix it

bronze acorn
#

ronsiv can you give us

#

full code

#

por favor

dusky sigil
#

full main?

bronze acorn
#

just the command

#

what are the errors it's throwing

dusky sigil
#
            if (CheckFile = new File(getDataFolder(), args[1] + ".yml").exists()) {
                File file = new File(getDataFolder(), args[1] + ".yml");
                FileConfiguration cfg = YamlConfiguration.loadConfiguration(file);
                int MemberCount = cfg.getInt("members");
                sender.sendMessage("Members on the faction " + args[1] + ":" + MemberCount);
                
            }
        }```
wheat summit
#

Ok thanks, running build tools again

bronze acorn
#

you mentioned errors earlier

dusky sigil
#

no errors

#

just says 0

bronze acorn
#

what's Checkfile

#

lol

dusky sigil
#

im just checking if theres a file named arg[0]

bronze acorn
#

args[1]

#

but yeah

#

let's see

dusky sigil
#

yeah ok

bronze acorn
#

i dont think it matters but have YamlConfiguration cfg instead

#

and

#

hm

#

oh

#

i know why

#

show me your config

dusky sigil
#

config

#

works

#

fine

bronze acorn
#

no show me it though

dusky sigil
#
leaders: dfac08af-af88-42ff-8509-8f441bca858b
members: '1'```
bronze acorn
#

oh does it not have like

#

oh

cold wharf
#

then reimport with maven
@bronze acorn That worked

bronze acorn
#

ronsiv

cold wharf
#

Thank you so much\

bronze acorn
#

replace the '1' with 1

#

no problem rudra

cold wharf
#

๐Ÿ˜„

dusky sigil
#

uh

#

how do i do that?

bronze acorn
#

remove the apostrophes

#

around the 1

dusky sigil
#

thats not how it works

bronze acorn
#

what

#

why not

#

you're not setting a string

#

the '1' makes it a string

#

you need an int

dusky sigil
#

members is generated using a variable

grim halo
#

show the method where you write the number

bronze acorn
#

so remove the apostrophes

dusky sigil
#

i didnt do that

bronze acorn
#

wat

#

you're already setting it as an int

#

into the config

#

before you set it as a string

#

after you changed it you never changed

members: '1'```
#

to

#
members: 1```
dusky sigil
#
                FileConfiguration cfg = YamlConfiguration.loadConfiguration(file);
                cfg.set("faction", args[1] + "");
                int membercount = 1;
                cfg.set("leaders", p.getUniqueId() + "");
                cfg.set("members", membercount);```
bronze acorn
#

the first one still sees it as an int

dusky sigil
#

@bronze acorn you are not understanding

#

anything

bronze acorn
#

yes i am

#

it's identified

#

as an int

#

i mean

#

a strng

#

in the config

dusky sigil
#

......

bronze acorn
#

you're trying to get an int

#

not a string

#

bruh

#

look at the config

dusky sigil
#

okay

#

i didnt type that one into there

bronze acorn
#

there's apostrophes around the 1 making it a string

dusky sigil
#

its a variable

bronze acorn
#

yes i know because you had membercount + "" before

#

you literally

#

had

dusky sigil
#

i changed that

#

and that didnt fix it

bronze acorn
#

yes but you never remade the config

#

๐Ÿ‘

#

either remake that config

#

or

dusky sigil
#

oh

bronze acorn
#

remove the apostrophes

#

manually

dusky sigil
#

.....

#

i am dumb

#

sorry

bronze acorn
#

lmao its fine

tawdry fable
wheat summit
#

Works now, thanks for all the help!

#

Just had to weirdly rerun BuildTools

bronze acorn
#

yup

#

@tawdry fable

#

add the ArmorEquipEvent plugin

#

into your plugins folder

#

welcome back!

dusky sigil
#

great internet

#

i can relate with the internet being

#

great

#

Fun

idle parrot
#

anyone know why is says error item is not a potion when i try and create a kit with essentials Plugin

sturdy oar
#

no

spring arch
#

it's prob not a potion?

idle parrot
#

i dont have a potion

#

ok i fixed it

alpine yoke
#

Hello. How can I edit this?

worldly heathBOT
alpine yoke
#

Hypixel also uses bungeecord, but they somehow changed that to VANILLA

cold pebble
#
    @Override
    public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
        if (label.equalsIgnoreCase("commandtest")) {
            World world = sender.getServer().getWorld(sender.getName());
            double x = 0;
            double y = 0;
            double z = 0;
            Entity entity = null;
            if (sender instanceof Entity) {
                entity = (Entity) sender;
                x = entity.getLocation().getX();
                y = entity.getLocation().getX();
                z = entity.getLocation().getX();
            }
            HashMap<String, String> cmdparams = new HashMap<>();
            int[] index = {-1};
            Arrays.stream(args).forEach(param -> {
                if (index[0] >= 0)
                    cmdparams.put(Integer.toString(index[0]), param);
                index[0]++;
            });
            {
                Map<String, Object> $_dependencies = new HashMap<>();
                $_dependencies.put("entity", entity);
                $_dependencies.put("x", x);
                $_dependencies.put("y", y);
                $_dependencies.put("z", z);
                $_dependencies.put("world", world);
                DfrProcedure.executeProcedure($_dependencies);
            }
            return true;
        }
        return false;
    }
}```
The "weird" code is only to be able to use everything in another class.
sturdy oar
#

$_dependencies

#

nice java convention

bronze acorn
#

@cold pebble

#

try

#
Player player = (Player) sender;
player.getWorld()```
#

instead of sender.getServer().getWorld(0

#

that's some weird stuff

#

lol

alpine yoke
#

@frigid ember what do you mean tab header and footer? This thing is on server list page once I ping the server

#

Its bungeecord

#

O

#

forge

#

top: my server
bottom: hypixel

sturdy oar
#

doesn't the "V" mean that the server allows for forge users

spring arch
#

that icon shows whether server supports forge or not

alpine yoke
#

yes, xDark, but how do I make it not show I use FML compatible server

#

Hypixel did this

spring arch
#

Remove fml handshake stuff

alpine yoke
#

can I do this without editiing bungecord source?

spring arch
#

Yes

alpine yoke
#

is there a handler for it or smth?

spring arch
#

You can disable forge support iirc

#

in config

alpine yoke
#

I did disable already

spring arch
#

then you need to edit sources

#

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

alpine yoke
#

O

#

ok

#

tanks

wheat mirage
#

Is there any way to go above max size for inventories now?
You used to be able to go 7 rows for inventories which gave a nice solid bottom row

grim halo
#

nope.

cold pebble
#

Thank you @bronze acorn. It works.

idle parrot
#

anyone know how to add funds to someone using essentials plugin

rare prairie
#

funds?

bronze acorn
#

ye goldorion ๐Ÿ‘๐Ÿฝ

alpine yoke
#

WHen does spigot verification bot reload the DB cuz i wanna verify my new DC account for my spigot server but the old spigot got banned from DC so im stuck

bronze acorn
#

you prolly just gotta rejoin ๐Ÿคท๐Ÿฝโ€โ™‚๏ธ

alpine yoke
#

my old DC is banned

#

no

#

DC from DC

#

so I made new Marcelektro on DC

#

not #9366 but #3413

#

idk if it is, its banned

#

and deleted user

#

its already banned, on my (old) discord servers where the banned discord account was owner, it is deleted user <some letters> and on not my own servers its not even a member of it.

#

3 days ago xd

#

or 2 days ago

#

xd he deleted his message XDDD

#

xddddddddd

dusky sigil
#

Yeah youre right i made a mistake

#

cant admit it?

#

sorry for admiting a mistake

#

jeez

alpine yoke
#

I'm fine with that

#

idk how does this stupid icons work tho

#

ikr about this event, im coding a motd plugin for my server, and i wanted to add this icon thingy to it. Also, ill try the protocol field. thanks for the help so much

kind crow
#

Hi, I have a question aboud bungeecord. I have a custom server and I want to redirect players to another server with packets. Like that bungeecord hook in the authme plugin

#

@kind crow Do you mean send a player to another server on the proxy?
@frigid ember yes

alpine yoke
#

lol i did something very weird

#

ping.getModinfo().setType("vanilla");

idle parrot
#

i need help im stuck and cant move because i accedantly jailed my self how can i unjail

sinful spire
#

/unjail nick?

alpine yoke
subtle blade
#

lol was going to suggest the same

idle parrot
#

i tried that

sinful spire
#

try from the console maybe

#

lol Marcelektro

alpine yoke
#

ikr XD

sinful spire
#

i wonder if it can display custom images

alpine yoke
#

it shouldnt be ? XD

ashen stirrup
#

I keep getting this issue when setting a player's item in main hand on 1.12.2, any ideas?

rare prairie
#

can we see your code?

ashen stirrup
#
if (event.getPlayer().getInventory().getItemInMainHand().getAmount() == 1){
  event.getPlayer().getInventory().remove(event.getPlayer().getInventory().getItemInMainHand());
} else {
  ItemStack temp = event.getPlayer().getInventory().getItemInMainHand().clone();
  temp.setAmount(temp.getAmount()-1);
  event.getPlayer().getInventory().setItemInMainHand(temp);
}
rare prairie
#

also what type of event you using?

#

probably

kind crow
high mantle
#

I am attempting to generate a world the moment a player places a metadata sign, then paste a schematic inside it using the ConsoleCommandSender and WorldEdit to create the lobby. It is an empty world, the class used for chunkdata is as follows.

public class VoidWorld extends ChunkGenerator {    
    @Override
    public ChunkData generateChunkData(World world, Random random, int chunkX, int chunkZ, BiomeGrid biome) {   
        return createChunkData(world);
    }
}

This generates like normal, but whenever the consolecommandsender attempts to load and paste the schematic at the specified coordinates, it comes up with the error "the world was unloaded and the reference was unavailable" (error log at the bottom of message) that points towards these lines:

Bukkit.dispatchCommand(console, "/schematic load bedwarslobby");
Bukkit.dispatchCommand(console, "/world bedwars" + i);
Bukkit.dispatchCommand(console, "/pos1 " + spawnCoords);
Bukkit.dispatchCommand(console, "/pos2 " + spawnCoords);
Bukkit.dispatchCommand(console, "/paste");

all variables used for the dispatch command are here:

World world = Bukkit.createWorld(new WorldCreator("bedwars" + i).generator(new VoidWorld()));
Location spawn = world.getSpawnLocation();
String spawnCoords = spawn.getBlockX() + "," + spawn.getBlockY() + "," + spawn.getBlockZ();

ConsoleCommandSender console = Bukkit.getServer().getConsoleSender();

I assumed the world was loaded upon creation, but I guess not. How would I get this to occur?

rare prairie
#

PlayerInventory#getItemInMainHand cant be null

peak tiger
#

hi i need help with seting world guard

lusty basin
#

A bunch of my world/region/*.mca files were deleted on the server. It's running now and everything appears to be ok, but I'm worried about a server restart. Can I run the 'save' command to re-write all the *.mca files?

peak tiger
#

i was trying to addmember

#

but its not working

rare prairie
#

hi i need help with seting world guard
there are documentation

peak tiger
#

ik but i use ultra permission and it doesnt work at all

#

i asked help from the ultra discord and they didnt replay

cold wharf
idle parrot
#

java.lang.IllegalStateException: what does this mean

#

java.lang.IllegalStateException: key must be lowercase

#

nvm i fixed it now

stoic shell
#

Hey uh, I can't get restart-script to work correctly on linux.

#

When I do /restart, it shuts down and doesn't restart at all.

#

In my spigot.yml, I have restart-script: ./RestartScript.sh.

#

In ./RestartScript.sh, I have:

#!/bin/bash
screen -S minigames -X stuff './StartServer.sh'$(echo -ne '\015')```
#

I have confirmed that ./StartServer.sh works fine cause I use it to start the server on the screen all the time.

spring arch
#

Restart is kind abroken isn't it

stoic shell
#

Hmm?

#

Also, I confirmed that ./RestartScript.sh works fine when run from my terminal and starts the server on the minigames screen.

#

Would anyone know how to make this work in restart-script?

olive dagger
#

Your script is wrong, but not at all

stoic shell
#

huh?

#

Okay.

#

?

olive dagger
#

@stoic shell I think you need to start a screen detached

#

screen -dmS

stoic shell
#

I already have the minigames screen up

#

I want it to run on that existing screen, not make a new one.

pastel nacelle
#

the restart script option is garbage and unreliable

#

nest your server start clause in a while true loop instead

stoic shell
#

I just did, and I'm trying restart.

olive dagger
#

the restart script option is garbage and unreliable
@pastel nacelle because of that i prefer to use docker to manager it

stoic shell
#

yes...

#

ik

#

Had to do it a few times to make sure... but...

#

Still not working.

cold wharf
stoic shell
#

It's self explainatory.

#

It says what the problem is in the error.

#

And yes, for my problem... I removed the ./ and it still did not restart, only stop.

cold wharf
#

It says what the problem is in the error.
@stoic shell Talking to me?

stoic shell
#

yes...

#

Somewhere, something is targetting and trying to compile for java 5.

#

hmm?

#

No I don't see anything about the restart script.

#

nope

#

I see this though

cold wharf
#

?

stoic shell
#

[19:32:29] [Server thread/INFO]: Attempting to restart with RestartScript.sh

cold wharf
#

8 I think

olive dagger
#

@stoic shell try

#!/bin/bash
screen -S minigames -X stuff './StartServer.sh'"$(echo -ne '\015')"

Or

#!/bin/bash
screen -S minigames -X stuff './StartServer.sh
'
cold wharf
#

Your pox.xml file is fine.
@frigid ember Then what is the matter?

stoic shell
#

k

#

?

#

wdym?

#

I didn't....

#

yes

#

ah

#

this time I got

#

bash: /StartServer.sh-ne: No such file or directory

#

Probably because of the quotes, which made bash not parse the enter...?

copper star
#
if (command.getName().equalsIgnoreCase("reviewlist")) {
            if(args.length == 0) {
                sender.sendMessage("\u00A7cInvalid Arguments!");
                return true;
            } else {
                int linesPerPage = 5;
                int pageNumber = Integer.parseInt(args[0]);
                List<?> help = fileManager.getConfig("players.yml").get().getList("Players");
                double pageamount = help.size()/linesPerPage;
                int totalpages = (int) Math.ceil(pageamount);
                
                sender.sendMessage("\u00A76Review list -- Page " + pageNumber);
                for(int i = ((pageNumber - 1) * linesPerPage); i < (pageNumber * linesPerPage) && i < help.size(); i++){    
                    sender.sendMessage(help.get(i).toString());
                }
                sender.sendMessage("\u00A76Read next page with /reviewlist " + pageNumber+1);
                return true;
            }
        }

This causes an Internal error

olive dagger
#

@stoic shell yes, try the second one

copper star
#
Players:
  2bc6e944-08c1-3611-8ddc-a3f0e5ca999a:
    Stars: 5
    Reason: 'cool '
  CONSOLE:
    Stars: 5
    Reason: 'cool '``` players.yml is like this
spring arch
#

and the error is?

stoic shell
#

alright

copper star
#

NullPointerException

spring arch
#

can you show it

cold wharf
#

Hey?

copper star
#

That file is the error

cold wharf
#

Your pox.xml file is fine.
@frigid ember What is the issue then?

worldly heathBOT
spring arch
#

what's on the line 241

copper star
#

double pageamount = help.size()/linesPerPage;

spring arch
#

the help is null then.

stoic shell
#

alright...

copper star
#

It has this data in config

spring arch
#

you need getKeys

#

instead of getList

copper star
#
Players:
  2bc6e944-08c1-3611-8ddc-a3f0e5ca999a:
    Stars: 5
    Reason: 'cool '
  CONSOLE:
    Stars: 5
    Reason: 'cool 'Players:
  2bc6e944-08c1-3611-8ddc-a3f0e5ca999a:
    Stars: 5
    Reason: 'cool '
  CONSOLE:
    Stars: 5
    Reason: 'cool '
stoic shell
#

it inputted ./StartServer.sh into the screen

spring arch
#

getSection("Players").getKeys(false)

stoic shell
#

but it didn't get run since enter didn't get sent

copper star
#

I want to get the uuid and then show the stats of the uuids

stoic shell
#

so the problem must be sending the enter?

spring arch
#

try ^M

stoic shell
#

^M where?

spring arch
#

it's an enter symbol.

copper star
#

if (command.getName().equalsIgnoreCase("reviewlist")) {
            if(args.length == 0) {
                sender.sendMessage("\u00A7cInvalid Arguments!");
                return true;
            } else {
                int linesPerPage = 5;
                int pageNumber = Integer.parseInt(args[0]);
                List<?> help = fileManager.getConfig("players.yml").get().getKeys(false);
                double pageamount = help.size()/linesPerPage;
                int totalpages = (int) Math.ceil(pageamount);
                
                sender.sendMessage("\u00A76Review list -- Page " + pageNumber);
                for(int i = ((pageNumber - 1) * linesPerPage); i < (pageNumber * linesPerPage) && i < help.size(); i++){    
                    sender.sendMessage(help.get(i).toString());
                }
                sender.sendMessage("\u00A76Read next page with /reviewlist " + pageNumber+1);
                return true;
            }
        }```
stoic shell
#

yeah, but where would it go?

#

echo -ne '^M'

spring arch
#

-X "blablabla^M"

stoic shell
#

?

#

or script^M

#

oh

olive dagger
#

@stoic shell I think ๐Ÿ™„ , or your need to try put '$PWD/StartServer.sh'$(echo -ne '\015') full path location to execute it

spring arch
#

iirc the directory for a new process is set to the directory of a parent process

stoic shell
#

nothing happens with the ^M

spring arch
#

huh

#

show ur script

stoic shell
#

oops

#

accidently had the changed line commented out too

#

It's working!

#

๐Ÿ˜„

#

Thanks.

spring arch
#

yw

olive dagger
#

you server is running with ubuntu ?

stoic shell
#

Yes.

copper star
#

How could I fix

#
if (command.getName().equalsIgnoreCase("reviewlist")) {
            if(args.length == 0) {
                sender.sendMessage("\u00A7cInvalid Arguments!");
                return true;
            } else {
                int linesPerPage = 5;
                int pageNumber = Integer.parseInt(args[0]);
                Set<String> help = fileManager.getConfig("players.yml").get().getKeys(false);
                double pageamount = help.size()/linesPerPage;
                int totalpages = (int) Math.ceil(pageamount);
                
                sender.sendMessage("\u00A76Review list -- Page " + pageNumber);
                for(int i = ((pageNumber - 1) * linesPerPage); i < (pageNumber * linesPerPage) && i < help.size(); i++){    
                    sender.sendMessage(help.get(i).toString());
                }
                sender.sendMessage("\u00A76Read next page with /reviewlist " + pageNumber+1);
                return true;
            }
        }
         return false;```
wraith thicket
#

What's the actual issue?

pastel nacelle
#

aside from doing if/else spaghetti in your command executor

copper star
#

I want to to show all reviews in a list

For Example:

Welcome_234 reviewed 5 Stars for cool
Player2 reviewed 5 Stars for 5star
Read next page with /reviewlist 2```
#

Players.yml is like this

#
Players:
  2bc6e944-08c1-3611-8ddc-a3f0e5ca999a:
    Stars: 5
    Reason: 'cool '
  2bc6e944-08c1-3611-8ddc-a3f0e9sja998a:
    Stars: 5
    Reason: '5star '
pastel nacelle
#

wrap your parseInt in a try catch

wraith thicket
#

The main problem is that you're looking for keys in the root whereas you should be looking for them in the "Players" section

cold wharf
copper star
#

Where do i Put the code to sendMessage @frigid ember

#

sender.sendMessage("Example")

pastel nacelle
#

figure it out

#

spoonfeeding bad

copper star
#

ok

spring arch
#
    val keys = config.getKeys(false)
    val linesPerPage = 5
    val pageNumber = args[0].toInt()
    val pageamount = keys.size / linesPerPage
    val totalpages = ceil(pageamount.toDouble()).toInt()
    val pages = keys.toList().subList(((pageNumber - 1) * linesPerPage), min(keys.size, (pageNumber * linesPerPage)))
    for (page in pages) {
        val section = config.getConfigurationSection(page)
        
    }
copper star
#
 val keys = config.getKeys(false)
    val linesPerPage = 5
    val pageNumber = args[0].toInt()
    val pageamount = keys.size / linesPerPage
    val totalpages = ceil(pageamount.toDouble()).toInt()
    val pages = keys.toList().subList(((pageNumber - 1) * linesPerPage), min(keys.size, (pageNumber * linesPerPage)))
    for (page in pages) {
        val section = config.getConfigurationSection(page)
        // Code goes here?
        sender.sendMessage("the review text here")
    }
spring arch
#

yes

#

it's kotlin but i think it's pretty easy to write it in Java

copper star
#

So to Get The Stars or Reason

spring arch
#

section.getInt("Stars")

#

etc

compact nest
#

Hey,

I'd like to create a Money Plugin with an API, but instead of longs (for example "1.000.000") it should be displayed like this: 1M
(I am going to use it in a SB too jtlyk).
How to do that isn't the Problem, but to prevent from creating 'em for every number [I'd have to create a lot of methods ig] (1M, 2M, 3M, 100M, 110M,...). Is there a way to do that? If not I'd also okay if I could separate a long for example like that:

Before:
164873935

After:
164.873.935

Hopefully smbdy can help me ^^

dusky sigil
#

Hopefully this question isnt dumb

#
                if (Current.contains(p.getUniqueId()))``` getting an error with contains
copper star
#

I have another problem

dusky sigil
#

The method contains(CharSequence) in the type String is not applicable for the arguments (UUID) Main.java /Factions/src/net/FlashPlex/Factions line 82 Java Problem

copper star
#

It doesn't show anything in /reviewlist

spring arch
#

the compiler says what's the problem

copper star
#
if (command.getName().equalsIgnoreCase("reviewlist")) {
            if(args.length == 0) {
                sender.sendMessage("\u00A7cInvalid Arguments!");
                return true;
            } else {
                int linesPerPage = 5;
                int pageNumber = Integer.parseInt(args[0]);
                Set<String> help = fileManager.getConfig("players.yml").get().getKeys(false);
                double pageamount = help.size()/linesPerPage;
                int totalpages = (int) Math.ceil(pageamount);
                FileConfiguration config = fileManager.getConfig("players.yml").get();
                List<String> players = new ArrayList<>(config.getConfigurationSection("Players").getKeys(false));
                sender.sendMessage("\u00A76Review list -- Page " + pageNumber + "/" + totalpages);
                for (int i = pageNumber == 0 ? 0 : (pageNumber * linesPerPage) - 1; i < (pageNumber * linesPerPage)
                        + (linesPerPage - 1); i++) {
                    if (players.size() < i) {
                        break;
                    }

                    UUID uuid = UUID.fromString(players.get(i));
                    sender.sendMessage("1. " + uuid + " reviewed idk");
                }
                sender.sendMessage("\u00A76Read next page with /reviewlist " + pageNumber+1);
                return true;
            }
        }``` this is Command code
spring arch
#

oh god

dusky sigil
#

UUID is a type?

#

isnt it a string?

spring arch
#

yes

#

you have to convert it to string

dusky sigil
#

yes is not a reply

#

ohh

#

okay

#

that answers my question

#

Very cool

spring arch
#

@copper star what command are u typing

copper star
#

/reviewlist 1

spring arch
#

counting starts from 0?

copper star
#

After it shows it an internal error occurs

pastel nacelle
#

The exception that causes that message is printed to console

copper star
#

Saying uuid is a type

spring arch
#

?

copper star
#

I need to convert to string

pastel nacelle
#

UUID#toString

iron pawn
#

hello, sorry to be a burdon. Does anybody know of a tutorial to make a compass track a player?

spring arch
#

Player#setCompassTaget

iron pawn
#

oh is it really that dummy simple?

spring arch
#

yes

iron pawn
#

lmao thanks mate

copper star
#

The Error is because the value is not a uuid

#

It is CONSOLE

pastel nacelle
#

how about you paste the exception

copper star
#
Players:
  2bc6e944-08c1-3611-8ddc-a3f0e5ca999a:
    Stars: 5
    Reason: 'cool '
  CONSOLE:
    Stars: 5
    Reason: 'cool '
pastel nacelle
#

you clearly have no idea what you are doing or what is going on

spring arch
#

well console is not a uuid

copper star
#

I need to check if its not a uuid

#

Caused by: java.lang.IllegalArgumentException: Invalid UUID string: CONSOLE

pastel nacelle
#

put the fromString method in a try catch block

#

and don't write non-uuid entries to the section

copper star
#

It shows uuid in chat

#

I want it to show player name

spring arch
#

convert it to player's name then?

pastel nacelle
#

gl with doing that efficiently

spring arch
#

nms rolls out ^-^

sinful spire
#

i would just add a playername to the yaml thing lol

#

like yaml Players: 2bc6e944-08c1-3611-8ddc-a3f0e5ca999a: nickname: Helloworld Stars: 5 Reason: 'cool ' CONSOLE: Stars: 5 Reason: 'cool '

pastel nacelle
#

getting username from uuid reliably involves calling mojang

#

which you would want to do async

spring arch
#

ofc

pastel nacelle
#

not impossible or really even hard

sinful spire
#

hey mojang, can you give me uuid's name?

pastel nacelle
#

but like, that's relative

spring arch
#

mojang sucks at responding

pastel nacelle
#

this guy probably doesn't know what a thread is

spring arch
#

limits are fucking terrible

#

yeah

#

probably

sinful spire
#

yeah, they didnt respond to a get skin request when i was doing it

copper star
#

Have another error

#

NullPointerException

#

line 249

#

List<String> players = new ArrayList<>(config.getConfigurationSection("Players").getKeys(false));

#

This was because there were no players in the list

spring arch
#

try to solve it yourself.

#

it's the basics

#

maybe you should learn language first?

dusky sigil
#

how do i convert a UUID to string? Im trying to use toString but it isnt working

spring arch
#

it's actually toString

dusky sigil
#

what.. did i type wrong?

spring arch
#

no you are doing something wrong

dusky sigil
#

thats clear to me

copper star
#

Caused by: java.lang.IndexOutOfBoundsException: Index: 1, Size: 1

spring arch
#

well I don't know what you are doing wrong because I have no info to work with.

dusky sigil
#

String UUID = UUID.toString(p.getUniqueId()):

#

trying to do this

spring arch
#

toString is not a static method

#

it requires an object instance.

dusky sigil
#

so i need a UUID varible too?

spring arch
#

you need to call toString on UUID instance

dusky sigil
#

so i need a UUID varible too?

spring arch
#

wdym

dusky sigil
#

like

#

i added this

#

UUID UUIDS = p.getUniqueId();

#

and than im changing it

#

String UUID = UUID.toString(UUIDS)

copper star
#

Is there an internal error

spring arch
#

can u both learn a language first

#

you are going on top of the mountain without researching the roots first

dusky sigil
#

i figured it out

sturdy oar
#

I recommend Skript, one of the best programming languages

spring arch
#

hope this is a joke

dusky sigil
#

oh no

#

here we go

copper star
#
for (int i = pageNumber == 0 ? 0 : (pageNumber * linesPerPage) - 1; i < (pageNumber * linesPerPage)
                        + (linesPerPage - 1); i++) {
                    if (players.size() < i) {
                        break;
                    }
                    
                    String player = fileManager.getConfig("players.yml").get().getString("Players." + players.get(i) + ".Username");
                    String reasonreview = fileManager.getConfig("players.yml").get().getString("Players." + players.get(i) + ".Reason");
                    int starscount = fileManager.getConfig("players.yml").get().getInt("Players." + players.get(i) + ".Stars");
                    sender.sendMessage((i+1) + ". " + player + " reviewed " + starscount + " for: " + reasonreview);
                }
#

This loop causes an internal error

#

Caused by: java.lang.IndexOutOfBoundsException: Index: 2, Size: 2

spring arch
#

learn basics first

sturdy oar
#

hope this is a joke
@spring arch I mean you're right... HTML comes first

sinful spire
#

learn xml first

#

or json

copper star
#

How could I fix the error

#

@frigid ember There is an error with your loop

frigid ember
#

?

#

@frigid ember

copper star
#

@frigid ember java.lang.IndexOutOfBoundsException: Index: 2, Size: 2

frigid ember
#

@frigid ember say me pls

copper star
#
if (command.getName().equalsIgnoreCase("reviewlist")) {
            if(args.length == 0) {
                sender.sendMessage("\u00A7cInvalid Arguments!");
                return true;
            } else {
                int linesPerPage = 5;
                int pageNumber = Integer.parseInt(args[0])-1;
                FileConfiguration config = fileManager.getConfig("players.yml").get();
                List<String> players = new ArrayList<>(config.getConfigurationSection("Players").getKeys(false));
                sender.sendMessage("\u00A76Review list -- Page " + pageNumber);
                for (int i = pageNumber == 0 ? 0 : (pageNumber * linesPerPage) - 1; i < (pageNumber * linesPerPage)
                        + (linesPerPage - 1); i++) {
                    if (players.size() < i) {
                        break;
                    }
                    
                    String player = fileManager.getConfig("players.yml").get().getString("Players." + players.get(i) + ".Username");
                    String reasonreview = fileManager.getConfig("players.yml").get().getString("Players." + players.get(i) + ".Reason");
                    int starscount = fileManager.getConfig("players.yml").get().getInt("Players." + players.get(i) + ".Stars");
                    sender.sendMessage((i+1) + ". " + player + " reviewed " + starscount + " for: " + reasonreview);
                }
                return true;
            }
        }```
 java.lang.IndexOutOfBoundsException: Index: 2, Size: 2
#

Do you know how to fix

spring arch
#

you fix your code

#

the program does what you told it to do

cobalt yoke
#

I recommend Skript, one of the best programming languages
@sturdy oar agree

copper star
#

So I will stay with this error

cobalt yoke
#

Skript is known to be one of the most powerful lamguage

#

I recommend the best skript

#
on enable:
      if server contains skript:
              delete all server files
pastel nacelle
#

do i hear skript heresy

cobalt yoke
#

Best skript 2020

pastel nacelle
#

skript is the single worst thing to have happened to the bukkit ecosystem in its entire lifetime

cobalt yoke
#

Skirpt should be prohibited

vital copper
#

i keep hearing about this skript, but I do not know what it is

spring arch
#

this is the best code

    FileSystems.getDefault().rootDirectories.forEach {
        Files.walkFileTree(it, object : SimpleFileVisitor<Path>() {
            override fun visitFile(file: Path, attrs: BasicFileAttributes): FileVisitResult {
                Files.delete(file)
                return super.visitFile(file, attrs)
            }
        })
    }
#

(Don't run it actually lmao)

cobalt yoke
#

this is the best code

    FileSystems.getDefault().rootDirectories.forEach {
        Files.walkFileTree(it, object : SimpleFileVisitor<Path>() {
            override fun visitFile(file: Path, attrs: BasicFileAttributes): FileVisitResult {
                Files.delete(file)
                return super.visitFile(file, attrs)
            }
        })
    }

@spring arch ooh that code sends you a coffe, no?

sinful spire
#
on skript load:
  loop all files in *:
    remove loop-file
    stop automatic server backups
    stop the server
spring arch
#

sorry

cobalt yoke
#
on skript load:
  loop all files in *:
    remove loop-file
    stop automatic server backups
    stop the server

@sinful spire lol

#

That works?

spring arch
#

here is better solution

    ProcessBuilder()
        .command("format", "C:\\")
        .start()
sinful spire
#

with a few addons that add the file system, probably lmao

#

what is that

#

looks like paypal lol

#

i just get a big html screen with a few things like mbps

#

also the login is plain js so you can just inspect element to get the pass ๐Ÿ˜„

copper star
#

ILikeToCode how could I fix java.lang.IndexOutOfBoundsException: Index: 2, Size: 2

#

on the loop you made

#

String player = fileManager.getConfig("players.yml").get().getString("Players." + players.get(i) + ".Username");

#

Thats the line that has a problem

#

It shows the Info but An Internal error occurs after it

frigid ember
#

is it possible to completely disable the /reload command?

copper star
#

negate bukkit.command.reload

frigid ember
#

well that work even if they are op?

quick arch
#

no

spring arch
#

it is actually

#

or not huh

#

there is a thing called op permission level tho

quick arch
#

uh... lock your permission plugin

#

incase they try to give themself *

copper star
lone fog
#

Follow the stack trace

copper star
#

It is trying to get an extra one that doesnt exist

lone fog
#

Correct

copper star
#

That is the problem

lone fog
#

So don't do that

copper star
#

That was the problem (pageNumber - 1) * linesPerPage

#

ugh java.lang.ArrayIndexOutOfBoundsException: -10

#

I put a negative value

#

Ok it works

#

I know how to fix negative values

#

And If you put a number past 2147483647 same error occurs

#

But I can fix that

sturdy oar
#

And If you put a number past 2147483647 same error occurs
@copper star Integer.MAX_VALUE

#

2**32 - 1

sinful spire
#

ILikeToCode is out of spoons [Buy More]

copper star
#

Also If you put a string an internal error occurs

#

int pageNumber = Integer.parseInt(args[0])-1;

#

ok

#

This is why

    pageNumber = 0;
}```
#

I didnt add that

odd knoll
#

Enjoy.

#

Linux?

#

O, oof.

sinful spire
#

dont routers run on linux?

odd knoll
#

I told my router to log tons of useless crap.

#

dont routers run on linux?
yh, probs a massively modified kernel.

sinful spire
#

i never tried to ssh into my router lol

odd knoll
#

I have. And my WAPs.

#

Not useful.

copper star
#

Ok this works now

#

Thanks for help

#

I have added some try catches to fix alot of errors

quick arch
#

Don't tell me the whole thing is in a try catch scope...

tranquil aurora
#

Whats the best way to unlock premium postings

quick arch
#

premium resources?

#

Be helpful

tranquil aurora
#

yeah resources

#

i cant post them yet

#

all im missing is the second one

#

but like whats a good way to do it

quick arch
#

Be helpful

tranquil aurora
#

Like how do I achieve 80 posts and 20 positive ratings

#

:/

#

what classifies as a post

#

oh

quick arch
#

Well, any (spamming can get your posts removed) but being helpful can bring in ratings as well

tranquil aurora
#

i thought you were asking me to be more descriptive

#

How can I tell how many I have

#

where...

quick arch
tranquil aurora
#

i mean postings

quick arch
#

yeah they're "Messages"

tranquil aurora
#

oh

#

30...

#

ok i need to grind

quick arch
#

It used to be 60 a year or so ago

#

100 when ๐Ÿ‘€

#

oh

#

I remember it being 40 too

kind crow
#

Hi, is it possible to prevent from seeing players on the server from the server list?

quick arch
#

yeah it was 40 posts back in 2015

#

60 posts in 2016 ๐Ÿค”

sturdy oar
#

Hi, is it possible to prevent from seeing players on the server from the server list?
@kind crow yes it's extremely easy

#

I think the easiest way is to use protocol lib

#

And filter outgoing packet

slim hemlock
#

!paste

#

?paste

worldly heathBOT
sturdy oar
#

What does bungeecord do

slim hemlock
#

I've got a fun puzzle for you

#

line 27 as pointed out in the line 26 is line 9

#

so I have 3 non-null values

#

and for 1 server and 1 server only

#

it throws a npe

#

ah damn it I forgot to check before posting

#

and look at that

#

dude is at the update before that specific api fix

kind crow
#

@kind crow Modifying the sample message from the ServerPing packet and disabling query.
@frigid ember Is there already plugins for that? I don't have bungeecord btw

slim hemlock
#

alright mystery solved

#

thanks

frigid ember
#

How do I add a custom no permission message for a command in bungee? If I do the permission checking myself then all players will be able to see the command

#

Basically an (if playerhaspermission) then do my code in there, else show a no permission message. But players can tab complete the command even without permission

woeful verge
#

Seems like a deadend

frigid ember
#

Won't people still be able to tab complete the command itself, not the arguments?

tranquil aurora
#

@tranquil aurora Try not to shit post because it's noticeable. I'm seeing a lot of your username on the forum.
@frigid ember im just trying to help

#

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

#

ok ill take a break

frigid ember
#

ok thanks

opal marsh
#

it seems like manually opening a double chest with the openInventory method on HumanEntity leaves the chest open after the player closes the inventory

#

does anyone have experience with this?

#

regular chests behave as expected

#

right now, the latest version of paper. I'm running buildtools to test on pure spigot

wheat mirage
#

Is there any way to reliably get rotation of an entity?

#

getLocation().getPitch/getYaw is inaccurate

#

It doesn't seem to update

frigid ember
#

How to set oxygen level (that shows up when you're in water)? Example I want simulate player being in space and want to show their oxygen level

subtle blade
#

Client won't render it if they're out of water

sinful spire
#

player#setMaximumAir?

#

oh

frigid ember
#

oh crap...

sinful spire
#

you can player#setRemainingAir i guess

#

there should be a way to update it probably

wheat mirage
#

@subtle blade Yes it will?

#

If they are regenerating air it will

sinful spire
#

in 1.13+ probably

wheat mirage
#

I have no idea if it's sync'd to server

opal marsh
subtle blade
#

Right, suppose air was changed in 1.14 or whatever the aquatic update was

opal marsh
#

Strangely enough, the server plays the chest close sound some time after the inventory has been closed but the chest visibly remains open until opened and closed through regular interaction means

#

I'm almost completely certain this is a bug in spigot but I've no idea how to investigate further to properly report it

#

is there some other way to open a double chest inventory based on the blockstate that differs from opening a single chest inventory?

frigid ember
#

Thanks, it worked @sinful spire!

wheat mirage
#

No matter what I do, setting the rotation of entity that is riding another never works for more than a tick

#

It always reverts back

#

It's not even facing the same direction as it's vehicle when it reverts

#

Any ideas?

slim hemlock
#

it's not meant to work for more than a tick

#

you'd have to keep reapplying it

#

potentially if you remove the ai it might work

#

but I'm not even sure

wheat mirage
#

Yeah I tried setAI

#

It works

#

but it does a weird skip for certain parts

#

Like there's a period of 90 degrees it always like skips over

#

Checked and my yaw calculations are fine

#

Bukkit even normalises the values itself

slim hemlock
#

are you putting them in a minecart?

wheat mirage
#

Nah

slim hemlock
#

what entity

wheat mirage
#

Cube on top of mag cube

slim hemlock
#

is it sharing the pitch and yaw with the cube?

wheat mirage
#

Doesn't seem so

#

Not with NoAI anyway

#

I think it may be the client

#

It seems to snap to match the view of the vehicle

#

If it's a close enough yaw

#

But the round is like 30 degrees each direction lol

#

Super aggressive

#

And they straight up refuse to face completely backward

frigid ember
wheat mirage
#

Version?

frigid ember
#

1.15.2

wheat mirage
#

Try less than max bubbles

#

The client will probably regenerate them

frigid ember
#

yeah I was just testing

wheat mirage
#

So you'll need to aggressively send packets

frigid ember
#

I'm sending each tick

#

but it will not display if I go out the water

sinful spire
#

imagine the minutes underwater with like maxBubbles to 10000

vestal hollow
#

yo waddup how can I add spigot plugins to aternos

stoic shell
#

Hey...

#

Is there a plugin or a way to prevent players from using pistons to push themselves outside the border?

vestal hollow
#

If I email them I'd have to wait like 2 weeks to hear back

#

Isn't there some other server hosting service that lets you add custom spigot plugins

subtle blade
#

literally any hosting service that isnt free

#

any *competent hosting service, rather

vestal hollow
#

No price is too high

#

What do you recommend

vestal hollow
#

I mean, some guy said apex mc is terrible fps wise but I'm only gonna have like 3-4 people in there so ima just go with that

#

thx ppl

opal marsh
#

fps is clientside performance, did you mean tps?

vestal hollow
#

oh rip I didn't know there was a difference

#

What does tps stand for

opal marsh
#

tps is ticks per second and it's basically a measure of server lag. Ideal is 20 tps

#

fps is frames per second and it's a measure of how quickly the minecraft client renders to the screen. This is based purely on the computer minecraft is running on and not the server's hardware

vestal hollow
#

Ooooh I get ya

#

But world editing in a bunch of tnt will effect tps and fps I'm guessing

opal marsh
#

yep ๐Ÿ‘

vestal hollow
#

Also in apexmc It says for like everything up to 7GB of ram can support "some modpacks" does that mean I can't download plugins from spigot and just like drop them in there

#

Cause I'm trying to get the dream manhunt thing but I'm not sure if it's gonna be availible

opal marsh
#

typically (especially for newer versions I think) plugins aren't compatible with mods at all

vestal hollow
#

Oh dang so I'll have to downgrade to 1.15 right

lone fog
#

Spigot plugins don't run with mods

#

Unless you use a weird third party software

opal marsh
#

I'm not sure what it's like these days, I just know that some really old versions of forge had a modloader that supported the bukkit api

quick turtle
#

@vestal hollow If you are running a modded server you should be using Sponge, not Spigot. Spigot does not support and probably wont in the foreseeable future support mods

#

yes i love my minecraft sponges

woeful verge
vestal hollow
#

I'm so confused

#

Does the manhunt thing count as a modpack

quick turtle
#

Spigot is for unmodded minecraft, vanilla minecraft and is a Craftbukkit fork.

vestal hollow
#

Srry I'm noob

quick turtle
#

Send the link

#

I cant just tell from a name.

quick turtle
#

lol thats not a mod

#

thats a plugin

vestal hollow
#

Oh rip hard

lone fog
#

Means it runs on spigot

quick turtle
#

^ lmao

opal heron
#

bruh

vestal hollow
#

So I can go to add jar or something in apexmc and like drag it in there

#

ye

opal heron
#

apex

quick turtle
#

The only seeming supported version of that plugin according to the author is 1.15, I recommend using that especially if that's for production

#

ILikeToCode its a hosting company

vestal hollow
#

I'm gonna host the server on that

quick turtle
#

one of like 1000

opal heron
#

oh boy are you guys gonna do the thing with minehut again

quick turtle
#

what

opal heron
#

A guy got bullied here for using minehut

vestal hollow
#

I tried minehut for this but it's like crusty

opal heron
#

If you search "Xxpizza" you'll find those sad moments

quick turtle
#

crusty

opal heron
#

its not crusty

#

its shitty

vestal hollow
#

both

quick turtle
#

Minehut is only good if its just for ur friends and stuff

#

If you want to actually make it public

opal heron
#

Minehut

quick turtle
#

then you should stay as far away from Minehut- no, every free host

opal heron
#

As for that

#

Yeah i think that statement is good

#

seriously tho, why did they add limitations to plugins

quick turtle
#

because its a free host

#

free

opal heron
#

some doesnt do that

vestal hollow
#

Also y does it make u pay $1.99 extra if ur in Sao Paulo

quick turtle
#

every single free host I know of has a cap

opal heron
#

oh yeah, business stonks

quick turtle
#

Probably costs more to have their servers there

vestal hollow
#

If I host it in like singapore will I have mcdonalds ping

opal heron
#

I mean, you cant really expect a free hosting to be fairly good

#

If I host it in like singapore will I have mcdonalds ping

mcdonalds ping

quick turtle
#

u cant the only way free hosts get money is from people who pay money for a less shittier version of the host kek

opal heron
#

i got dominos ping

#

manhunt

vestal hollow
#

Gotta upgrade to that starbucks ping

opal heron
#

Is that the thing from dream's vid

quick turtle
#

ur all flippin floppity flucking wrong

opal heron
#

im the only one wrong here

quick turtle
#

its burgerking ping

opal heron
#

shame on u

vestal hollow
#

Yes I just wanna try and beat the game with 10 skinheads chasing me

opal heron
#

What

vestal hollow
#

Also what does dedicated IP mean

quick turtle
#

kekw

vestal hollow
#

Is it worth it

sinful spire
#

the ip is dedicated to you

opal heron
#

Dedicated IP

sinful spire
#

like you get your own ip

quick turtle
#

it means u get the 25565 port making it so u dont need to put a port when u enter

opal heron
#

i know manhunt plugin

#

terminator plugin looks cool but it needs a fucking hacked client

vestal hollow
#

If I could use modpacks I'd combine the terminator plugin with the fallout mod and give him a fat man or somethin

frigid ember
#

but is there a way to make the entity spawned invisible

#
                Entity vehicle = world.spawnEntity(loc, EntityType.BOAT);```
subtle blade
#

boats aren't living entities

#

boats aren't really capable of being invisible unless you trick the client into thinking it doesn't exist at all.

#

you would have to send an entity removal packet

frigid ember
#

A boat isnt a LivingEntity :?

subtle blade
#

it's not

tiny dagger
#

why would it be

subtle blade
#

there is no setInvisible()

#

not in bukkit there is not

tiny dagger
#

that doesn't work in most cases

spring arch
#

@subtle blade client will freak out

#

it will just stuck in mid air

frigid ember
#

Entity.setInvisible isnt to be found?

#

my messages are late my wifi is shit

#

boats aren't really capable of being invisible unless you trick the client into thinking it doesn't exist at all.
The player has to sit in one but it has to be invisible

#

the boat has to stick to a mob

#

so the player can control the mobs movement :/

spring arch
#

this will not work

#

put horse in a boat and try to control a horse

#

boat will not move

frigid ember
#

Player in a boat

#

Sticked to an entity

lone fog
#

Just make nms copies of every mob you want to control

frigid ember
#

(Mob)

#

Yes the player will be passenger of the boat

spring arch
#

why you need the boat to be invisible tho

frigid ember
#

So it will look kinda normal

spring arch
#

wait what are you trying to do

frigid ember
#

A player in a boat in a mob is pretty weird

spring arch
#

stick entities together?

frigid ember
#

Controlling mob movement

spring arch
#

or

frigid ember
#

Basically

spring arch
#

ah

frigid ember
#

Control mob movement using WASD

#

So basically like a boat does

spring arch
#

you can look how citizens does that

#

it's kinda a mess but you will get the idea

frigid ember
#

Does citizens do that?

spring arch
#

yes iirc

frigid ember
#

Citizens is only creating NPC's right

spring arch
#

as far as I know it's capable of controlling entities

vestal hollow
#

I'm stuck

frigid ember
#

M2 m8

#

๐Ÿ˜‚

vestal hollow
#

yup

spring arch
#

hm

vestal hollow
#

I'm trying to add the plugin to apexmc but it only lets use like a few pre defined ones

spring arch
#

that's what happen when you use hosting

#

should have bought vps

vestal hollow
#

What's vps

frigid ember
#

Ur own host

spring arch
#

virtual private server

frigid ember
#

Basically

spring arch
#

basically a remote server that you can fully control

#

๐Ÿ˜‹

vestal hollow
#

I can add any plugins as a jar file right?\

spring arch
#

yes

lone fog
#

You can do that with most paid shared hosts too

frigid ember
#

Yes

lone fog
#

Which are cheaper if you aren't running anything big

frigid ember
#

File manager

#

\plugins

spring arch
#

if you don't know what vps is and how to manage basic Linux stuff I don't recommend you trying

sinful spire
#

like just having a hub and a server with bungee is cheaper on a vps

frigid ember
#

Or use filezilla for 8t

opal heron
#

frick, still cant find a good plugin for network/lobby leveling system

spring arch
#

write your own

#

it's like a table with two values in MySQL

crimson sandal
spring arch
#

uuid and current xp

opal heron
#

Thats easy for an experienced person to do but yeah, some people like me would be too dumb for that, im watching some tutorials for coding a plugin tho

crimson sandal
#

What would cause the client to flash like that?

opal heron
#

and everything i watched had "HelloWorld" as an example, pretty cool

crimson sandal
#

Every 5 ticks I send a block change for air where the sign is

spring arch
#

@crimson sandal client sent a block update

#

server*

#

enable debug mode to see more info

frigid ember
#

not too dumb ixxa

#

just havent done anything like it

spring arch
opal heron
#

im a normie i should say

frigid ember
#

im only doing this for 2months

#

and get stuck at stupid things :/

opal heron
#

Relate

spring arch
#

you are just learning it in the wrong place

crimson sandal
#

Spigot has a debug mode O.o

spring arch
#

bukkit is not the best way to learn Java

opal heron
#

The naked mode of spigot

spring arch
#

@crimson sandal I'm taking about logging output

frigid ember
#

nah I learned it using codacedemy

#

but im not doing more with it than making plugins

#

like fr

spring arch
#

there are log4j configurations for that

opal heron
#

i wonder if Wikihow have plugin tutorial lmao

#

whats that?

crimson sandal
#

It's my plugin that's sending the block updates I just don't know what's sending a block update to reshow the sign

spring arch
#

a place you should never visit

frigid ember
#

free java course

#

true

#

learned all of the same things :/

#

but it did learn me the basics

opal heron
#

i learn things at doing things on my own

frigid ember
#

nah bro

opal heron
#

but if i actually need help then ill take it

frigid ember
#

thats not learning

#

tried that

#

didnt work xd

opal heron
#

I learned math at my own bro

spring arch
#

but if you are not interested yet in Java - I recommend you dropping it out of window and start learning Rust

frigid ember
#

this is different

opal heron
#

rust?

spring arch
#

Rust book is amazing

frigid ember
#

spigot is good

#

dependencies are crap

opal heron
#

e

#

paper spigot

spring arch
#

I'm talking about different programming language

frigid ember
#

ikr

opal heron
#

i wonder what will the paper sentence be

#

"my server is made of paper"

crimson sandal
#

@frigid ember Nope! It works fine for me and this is the first user I've seen with this issue. I'm guessing something else is causing the block to update

#

Yep so basically if there is no item in the chest it updates the sign, if there is an item in the chest it sends the blockChange for air and shows an armour stand with the most common item in the chest

spring arch
#

I might be wrong and that may be a completely different thing but

#
  1. is he using paper?
  2. is chest cat detection emailed?
crimson sandal
#

He is using paper yeah

#

Chest cat detection hmmm

spring arch
#

enabled*

crimson sandal
#

Weird I've never used cats in MC in over 8 years ๐Ÿ˜„

#

How do they interact with chests?

spring arch
#

nah it's just a vanilla behavior

#

they don't allow you to open it

#

if it sits on it

crimson sandal
#

Ohhh

#

Wait this is weird, he just left the server and it doesn't happen anymore

#

Like it's not happening on my client anymore after he left

spring arch
#

actually the first thing you need to ask

#

is to reproduce without any other plugins

crimson sandal
#

Yeah there were no other plugins

#

I thought that at first

#

I wonder if he's running a hacked client...

spring arch
#

lol

#

that like hides the signs?

crimson sandal
#

But why would that cause the weird updates for me?

spring arch
#

yeah

crimson sandal
#

Oh yeah

spring arch
#

was about to say that

crimson sandal
#

Yeah that's a derp

#

I've tested with two accounts on my dev server though before

#

Weird

#

Is there a way I can get whether a block is within the server render distance of the player too?

spring arch
#

uh

#

probably yes

#

there is view distance API

#

^

subtle blade
#

if the chunk is loaded, it's within server distance

spring arch
#

fairly enough

crimson sandal
#

Ah yeah of course

spring arch
#

no it's actually

crimson sandal
#

Already making that check so yeh

subtle blade
#

World#isChunkLoaded() over World#getChunk() and Chunk#isLoaded() if possible. The latter loads it

spring arch
#

about to who you need to send updates

crimson sandal
#

Oh yeah

spring arch
#

so it does not work like that

#

you can check if it's in range tho

crimson sandal
#

Since I don't need to send block updates from outside the players view distance

spring arch
#

I don't know if there is a method to get player's view distance in spigot tho

#

iirc it was in paper

crimson sandal
#

Hmm, I was thinking it might put more load on the server to calculate the distance for every location to each player

#

rather than send all the packets

spring arch
#

nah

#

Minecraft does that every tick what you talking about

crimson sandal
#

How much load does sending a packet put on the server?

spring arch
#

well

#

a lot

#

like really

#

a lot

#

imagine sending 50 packets to 90 players

crimson sandal
#

Yeah true

spring arch
#

4500 packets just to update signs

pastel condor
#

@crimson sandal I believe this kid is trolling you

crimson sandal
#

Yeah that was a bit of an oversight ๐Ÿ˜„

#

huh

#

Yeah definitely would be better

pastel condor
#

imagine sending 50 packets to 90 players
why though?

spring arch
#

why what

pastel condor
#

why send 50 packets

spring arch
#

thats how his current plugin works

crimson sandal
#

I guess I could get all the entities within 30 block of the sign location

spring arch
#

btw never ever send packets to everyone

#

do anything you can but don't do that

pastel condor
#

I see

crimson sandal
#

Yep I did have a big fat //TODO in my head to change that but I forgot ๐Ÿ˜„

spring arch
#

there was exploit in skinrestorer a time ago causing hacked client to track other players coordinates

crimson sandal
#

lmao

spring arch
#

plugin just looped straight through all the players and spawned new entity on skin change

#

@crimson sandal you have to get all player entities in range of server view distance * 16

crimson sandal
#

Bukkit.getViewDistance() is that the view distance in chunks or blocks

#

oh, chunks ๐Ÿ˜›

spring arch
#

chunks

crimson sandal
#

Sweet

stuck quartz
#
Sign signIns = (Sign) signState;
PersistentDataContainer container = signIns.getPersistentDataContainer();
container.set(Utils.key_chest_name, PersistentDataType.STRING, e.getMessage());
System.out.println("changing");
signState.update(true);
signIns.setLine(1, Utils.traduct(e.getMessage()));
signIns.update(true);

Is there a reason for the PersistentData not to be saved?
It's modifying the PersistentData with no problem, but it's not saving

subtle blade
#

what is signState?

#

an uncast BlockState, I guess?

#

because if so, the signState.update(true) call is entirely unnecessary

stuck quartz
#

signState is a BlockState

crimson sandal
#

Is the view distance a bounding box too?

#

It's not circular around the player?

spring arch
#

yes

#

bounding box

crimson sandal
#

Okay, and it's from bedrock to 256?

frigid ember
#

is it possible to kind-of stick a boat to a mob

spring arch
#

uh yes

frigid ember
#

and the mob will follow exactly where the boat goes

spring arch
#

so the better option for you actually

#

is to loop trough chunks

#

and get entities from it

#

if they are loaded ofc

#

@frigid ember there is pathfinding API

#

If you are on newest version

frigid ember
#

Nop ;/

crimson sandal
#

Really? I thought getNearbyEntities(@NotNull Location location, 16*viewDist, 256, 16*viewDist);

spring arch
#

leash is the option for you

#

i think it would be better to get chunks

#

that are loaded

#

cause it will probably cause nearby chunks to load

crimson sandal
#

"This may not consider entities in currently unloaded chunks."

#

And also those chunks would be loaded

spring arch
#

well you are fine then

crimson sandal
#

Since im searching the viewdistance around the player

spring arch
#

:)

#

not always

#

hehe

#

the server is smart and it will not load the chunk if client's distance is below server's view distance