#development

1 messages · Page 123 of 1

night ice
#

You sure the code is even getting compiled?

#

if (sender instanceof Player player) I don't think this is possible! Correct me if i am wrong

dense drift
#

Java 14 pattern matching instanceof

night ice
#

I was on java 16 or 17…so doesn’t it have that tho?

burnt turret
#

Since event.setJoinMessage is deprecated, what do I use?

dusty frost
#

d;spigot PlayerJoinEvent#setJoinMessage

uneven lanternBOT
#
public void setJoinMessage(@Nullable String joinMessage)```
Description:

Sets the join message to send to all online players

Parameters:

joinMessage - join message. If null, no message will be sent

dusty frost
#

it is?

#

Paper, maybe?

dense drift
#

Yes, paper

#

probably joinMessage(Component)

dusty frost
#

^

dense drift
#

d;paper PlayerJoinEvent#joinMessage(Component)

uneven lanternBOT
#
public void joinMessage(@Nullable Component joinMessage)```
Description:

Sets the join message to send to all online players

Parameters:

joinMessage - join message. If null, no message will be sent

lyric gyro
#

just so you know, it shows you right there why it's deprecated

dense drift
#

xD

lyric gyro
#

like.. read, lol

pulsar ferry
#

Because a string is not a component

past sun
#

Hello sorry for the inconvenience I wanted to know if it is possible to have a hand with deluxemenu

leaden plume
#

@past sun ^

past sun
#

oh sorry

burnt turret
#

Like using a component

#

instead of a string

pulsar ferry
drowsy edge
#
for (UUID uuid : arena.getPlayers()) {
Player player = Bukkit.getPlayer(uuid);                              if(player.getScoreboardTags().contains("arena1")) {                      player.getScoreboardTags().remove("arena1");
if (arena.getTeam(player) == Team.BLUE) {
ItemStack dri = Dricane();
dri.setAmount(12);                                       player.getInventory().addItem(dri);
}
return;
} else if(player.getScoreboardTags().contains("arena2")) {               player.getScoreboardTags().remove("arena2");
if (arena.getTeam(player) == Team.BLUE) {
ItemStack dri = Dricane();
dri.setAmount(12);
player.getInventory().addItem(dri);
}
return;
}
}

So im trying to make a minigame thing and the players on the winning team get a specific amount of an item but when I ran tests the scoreboard checking was not working whatsoever any ideas?

void orchid
#

Are you in IntelliJ? if so, could you please press CTRL + ALT + L in your IDE, and post that code instead? It'd be much cleaner to look at

drowsy edge
#

k

#

i ran it

#
for (UUID uuid : arena.getPlayers()) {
Player player = Bukkit.getPlayer(uuid);
if (player.getScoreboardTags().contains("arena1")) {
player.getScoreboardTags().remove("arena1");
if (arena.getTeam(player) == Team.BLUE) {
ItemStack dri = Dricane();
dri.setAmount(6);
player.getInventory().addItem(dri);
}
return;
} else if (player.getScoreboardTags().contains("arena2")) {
player.getScoreboardTags().remove("arena2");
if (arena.getTeam(player) == Team.BLUE) {
ItemStack dri = Dricane();
dri.setAmount(6);
player.getInventory().addItem(dri);
}
return;
}
}
pulsar ferry
#

Lol

drowsy edge
#

lol

shell moon
#

lol

leaden sinew
#

Lol

pure crater
#

lol

dusky harness
#

lol

cinder forum
#

lol

trail burrow
#

I tried updating Statz and I changed Java8 to Java16 and now it runs for a few minutes then crashes server, won't run long enough to get timings report

void orchid
#

Have you tried looking through the crash dump? It might provide some useful info

trail burrow
#

no crash reports

#

I am testing on 1.17.1 paper

trail burrow
#

[19:04:07 WARN]: Can't keep up! Is the server overloaded? Running 10754ms or 215 ticks behind

trail burrow
junior shard
#

When I run my command twice, it is not sending the "Error! (target) already has a pending appoint request" message and is instead doing this

#

It's supposed to do this for the first time, however not the second

#

If they already have a pending appoint request (their name is in the "appointPlayers" list) it should send the error message and stop the command

grim oasis
#

oh drew

#

?plsnoarrowcode

neat pierBOT
grim oasis
#

also I can't see appointPlayers

#

more code = better

junior shard
#

idk how to do that without it being "arrow code"

grim oasis
#

over time

#

but also I can't see it all, so I can't help

junior shard
#

I can just send the entire class

#

appointPlayers is up at the tippy top

grim oasis
#

so

#

every time a command is called you make a new list

shell moon
#

List<String> appointPlayers = new ArrayList<String>();

#

yes he does

grim oasis
#

appointPlayers should instead be a field variable that gets initialized in constructor, then modified later

#
if (args.length < 1) {
                    player.sendMessage(ChatColor.translateAlternateColorCodes('&', prefix + " &cIncorrect Usage! &7Use &b/appoint help &7to see correct command usage."));
                    return true;
                }else {
``` you see this @junior shard ?
#

you don't need the else

#

because once you return, it stops executing the code

#

so you can remove the else which will flatten it a bit

#

and when checking for the permission you could instead check if they don't have permission then return

#
if(!haspermission){
//send no perm message
return true;
}
//code
junior shard
#

Okay hold on let me process

#

lol

grim oasis
#

like I said, over time if you do this enough it'll be natural

junior shard
#

so instead of the else should I just do if (args.length > 1) {

grim oasis
#
                        if (args[1] != null) {
                            if (args[2] != null) {
``` can be combined into `if(args[1] != null && args[2] != null)`
grim oasis
#

the else is useless, because it's already going to do that code no matter what else

#

and if the condition is met, it returns before it gets to the rest of the code

rigid mountain
#

so im trying to outline all the chunks around a player in particles in a 3x3 region. this is the code i have.

                for(Chunk c : getChunks(chunk , 1)) {

                    if(Claim.chunkToClaims.get(c) != null && Claim.chunkToClaims.get(c).getOwner().equals(p.getUniqueId())) {
                        dustOptions = new Particle.DustOptions(Color.fromRGB(0, 255, 0), 1);
                    } else {
                        dustOptions = new Particle.DustOptions(Color.fromRGB(255, 0, 0), 1);
                    }

                    int minX = c.getX()*16;
                    int minZ = c.getZ()*16;

                    for(int i = 0; i < 16; i++) {
                        int x1 = minX + i;
                        int z1 = minZ + i;

                        int x2 = (minX + 15) - i;
                        int z2 = (minZ + 15) - i;


                        p.spawnParticle(Particle.REDSTONE, x1, minY, minZ, 120, dustOptions);
                        p.spawnParticle(Particle.REDSTONE, minX , minY, z1, 120, dustOptions);
                        p.spawnParticle(Particle.REDSTONE, x2,  minY, minZ + 15, 120, dustOptions);
                        p.spawnParticle(Particle.REDSTONE, minX + 15, minY, z2, 120, dustOptions);

                    }

                }```

this works with one chunk, but not with multiple not sure why. and here is my get chunk method 
https://i.imgur.com/DgLLiXL.png
https://i.imgur.com/lt9lKkN.png

```public List<Chunk> getChunks(Chunk centerChunk, int radius){
        List<Chunk> chunks = new ArrayList<>();
        for (int x = centerChunk.getX()-radius; x < centerChunk.getX() + (1 + radius); x++) {
            for (int z = centerChunk.getZ()-radius; z < centerChunk.getZ() + (1 + radius); z++) {
                Chunk chunk = centerChunk.getWorld().getChunkAt(x, z);
                chunks.add(chunk);
            }
        }
        return chunks;
    }```
junior shard
#

@grim oasis so in terms of the image you sent; for args[0] == null I would do:

if (!args[0] == null) {
  //code for command being ran correctly
}
// Incorrect usage code

?

grim oasis
#

that picture is part of the ?plsnoarrowcode link

#

it's 1 of 4 parts

#

you already have

if(args[0] == null){
  //error code
  return;
}
// function body code
junior shard
#

ah gotcha

grim oasis
#

function code should always be at the bottom of the if

#

because if it's inside the if, it starts to make the arrow

#

y'kno?

#

further down the line when your function code has another if statement, that would indent it more

junior shard
#

Yeah makes sense

junior shard
#

Any ideas?

junior shard
#

It makes no sense to me how all of a sudden... its null

#

Was working perfectly fine, didn't touch anything in the main class

#

Hell it is even identical to another plugin I made where I needed to grab the config in another class

#

and the other plugin loads fine, but it doesnt like this one?

sterile hinge
#

I'd recommend to pass this to the Appoint constructor too, same as with LuckPerms

sudden sand
#

@junior shard always define your "plugin" instance at first in onEnable

#

it will fix it

sterile hinge
#

No, just don’t have something like that at all

sudden sand
dense drift
#

no static plugin instance is better

spiral prairie
cinder forum
#

Hello guys, can you recommend lib for Mongo? (Java)

wheat carbon
#

the official one

cinder forum
#

I mean

#

some library that make things easier

wheat carbon
#

hard is not a word I'd use to describe the mongo java library

dense drift
#

I mean, it uses the same syntax for queries as mongo itself

#

but yeah, at first it might seem hard

wheat carbon
#

you don't even need to use any queries

dense drift
wheat carbon
#

oh right

trail burrow
#

the basic steps to uploading a maven repository?

dense drift
#

format your code if you want help

drowsy edge
#

nvm i think i figured out why

sterile hinge
#

literally the same way as you did with LuckPerms

junior shard
#

so (new Appoint(this && luckPerms));

Or create an entirely new line

#

also should I define a static instance outside of the onEnable?

Such as:

public static ChosenMcAppoint getInstance() {
  return (ChosenMcAppoint)Bukkit.getPluginManager().getPlugin("plugin");
}
graceful hedge
#

Well

#

You got JavaPlugin.getPlugin(ChosenMcAppoint.class)

#

Which is a singleton since Bukkit kinda guards the instance of your plugin

junior shard
#
public class ChosenMcAppoint extends JavaPlugin {
    private static ChosenMcAppoint plugin;
    @Override
    public void onEnable() {
        plugin = this;
    }
    public static ChosenMcAppoint getPlugin() {
        return plugin;
    }
}
#

@graceful hedge ?

graceful hedge
#

Uh that’s technically useless

#

As said

sterile hinge
junior shard
#

Okay, makes sense

pure crater
#

😦

shell moon
#

But works fingerguns

graceful hedge
#

:<

junior shard
#

lol

junior shard
drowsy edge
#

https://paste.helpch.at/wehotejibi.cs
e im trying to make it to where when you win the game it gets all the players on the winning team and gives a specific ammount of an item (for now) to the players but It wont check correctly and I honestly dont know why

shell moon
#

why not simply creating your own arena manager

#

instead of relying on that thing

#

just wondering

forest jay
dense drift
#
for (Player player : notOnTeam) {
    player.performCommand("jointron");
    notOnTeam.remove(player);
}```

You can't iterate over a collection and modify it in the same time
#

remove the notOnTeam.remove call, you already have a notOnTeam.clear() call after that loop

forest jay
#

k, also, the error repeats every second

#

so I also think the task never cancels

shell moon
#

why no simply BukkitRunnable and then cancel();

forest jay
forest jay
forest jay
drowsy edge
#

hm

#

ill make a winner thing then ig

frosty cobalt
#

anyone know why this code isnt working ingame? ::

#

package com.omega;

import org.bukkit.ChatColor;
import org.bukkit.Material;
import org.bukkit.block.Block;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.block.Action;
import org.bukkit.event.player.PlayerInteractEvent;

public class Move implements Listener {
@EventHandler
public void onInteract(PlayerInteractEvent event) {
Action action = event.getAction();
Player player = event.getPlayer();
Block block = event.getClickedBlock();
if (action.equals(Action.LEFT_CLICK_BLOCK)) {
if (block.getType().equals(Material.EMERALD_BLOCK)) {
if (player.getHealth() != 20.d) {
player.setHealth(20.d);
}
player.sendMessage(ChatColor.GREEN + "You have been healed!");
if (player.getHealth() != 20.d) {
player.setHealth(player.getHealth() + 2);
}

            }
        }
    }
}
dusty frost
#

you don't use .equals for enums

#

you use ==

#

and, did you register the listener in your onEnable?

shell moon
#

Class name Move, proceeds to listen to interact event mike

frosty cobalt
frosty cobalt
dusty frost
#

for numbers?

#

no, it's for anything that's not an object

sinful shard
#

i need help with my world plugin, i have a system where when the player disconnects, it saves their location, then it teleports them to the location when the rejoin, but something must be configured wrong, because it does whta its suppsoed to with the world, but i always get tped to 0,0,0

Main Class: https://paste.helpch.at/sinatuxode.java
YML File:

  db0be134-f6ce-4991-a404-0707a576e524:
    logoutWorld: world
    lougoutX: 99.30000001192093
    lougoutY: 82.04516167274306
    lougoutZ: 99.30000001192093

Yml Creator:https://paste.helpch.at/ejuyoroxiv.java

night ice
#

Print the values of the player when they join the world

#

@sinful shard

sinful shard
#

?

#

wdym

#

oh

#

its 0,0,0

#

i think i have the wrong form of parsing?

#

is it supposed to be double?

#

cause im using .getDouble()

pure crater
#

you know, there is a built in method iirc for serializing/deserializing location

night ice
#

The reason for that is mostly your key for the config would be wrong…since it returns primitive it can’t be null so it returns 0

sinful shard
#

??

night ice
#

Try using toString() in player.getUniqueId

sinful shard
#

ok

night ice
#

Rather than calling the object directly

void orchid
#

you spelled it wrong

pure crater
void orchid
#

lougout is supposed to be logout on your quit

pure crater
#

you dont have to go through this hassle if you just make the api do it for you

sinful shard
#

shoot spelling mistake

sinful shard
night ice
shell moon
#

or, dont use it

#

if world is loaded after you load the config file

#

you'll get a nice error

#

which is bad

night ice
#

I don’t use Bukkit’s file system 😝

shell moon
#

so, use the bukkit one if you are sure world will be loaded before your load the file

#

or simply save it your own way

night ice
shell moon
#

no

#

file is not loaded

#

= useless

night ice
#

Try catch?

shell moon
#

if something throws error

sinful shard
shell moon
#

it doesnt finish loading

#

= not loaded

night ice
shell moon
#

= useful

#

catching error doesnt fix the issue

#

additionally

#

why catching when you shouldn't even get errors

sinful shard
#

well how would I load them then to make it work?

night ice
shell moon
#

is like loading a plugin and catching just in case

#

error shouldnt happen in first place

night ice
shell moon
#

yeah, exactly

#

so, make sure it loads before your load the file

#

or save it yourself

night ice
#

Someone previously mentioned that there were notnull annotated methods which returned null…Thats what bukkit is made of

shell moon
#

Bcs... its bukkit

#

hence why you make things yourself

night ice
#

xD

shell moon
#

or something, you can try catching error when loading the file

#

but well

dusky harness
shell moon
trail burrow
#

can some set me straight on what I'm reading on my goggle search, I want to setup maven repositories for my plugin

past ibex
#

I just use jitpack so people can use the API on my plugins

trail burrow
#

I guess jitpack would be easier?

past ibex
#

If your plugin is on github it is

trail burrow
#

yes I use Github

frosty cobalt
dusty frost
#

yeah

frosty cobalt
#

i did that it no work

#

thoughts?

shell moon
#

equals for objects

#

as Star said

#

enums use ==

frosty cobalt
#

okay

#

so i used ==

#

didnt work still

shell moon
#

it does work

#

your code is the issue

#

(most likely)

frosty cobalt
#

obviouslty

#

that's why im trying to ask for help

leaden sinew
#

Meant to reply to the 2nd message above that one

shell moon
past ibex
#

you can use .equals on an enum, it will just be identical to ==

frosty cobalt
#

okay so can anyone tell me what the problem is then?

past ibex
#

Have you learned how to use the debugger?

frosty cobalt
#

tbh no

#

lmfao

past ibex
#

learn it

frosty cobalt
#

thanks

past ibex
#

You can step code line by line to know exactly what it's doing

#

and even run code while the program is stopped to see what it would do

frosty cobalt
#

oh cool

past ibex
#

and also edit methods without restarting the server

frosty cobalt
#

thanks man

dusky harness
#

I can't figure out how to spawn a fake player :((

#

there are also no errors

lyric gyro
#

not a clue

leaden sinew
leaden sinew
junior shard
#
// LIST COMMAND
// /appoint list
        if (args[0].equalsIgnoreCase("list")) {
            for (String key : ChosenMcAppoint.aPlugin().getConfig().getConfigurationSection("Groups").getKeys(false)) {
                ConfigurationSection configSection = ChosenMcAppoint.aPlugin().getConfig().getConfigurationSection("Groups." + key);
                String permission = ChosenMcAppoint.aPlugin().getConfig().getConfigurationSection("Groups." + key).getString(".permission");

                if (sender.hasPermission(permission)) {

                    sender.sendMessage(ChatColor.translateAlternateColorCodes('&', prefix + " &eList of groups you may appoint as" + "&6 " + key));

                    List<String> rankList = ChosenMcAppoint.aPlugin().getConfig().getConfigurationSection("Groups." + key).getStringList(".groupNames");

                    for (int i = 0; i < rankList.size(); i++) {
                        sender.sendMessage(ChatColor.translateAlternateColorCodes('&', "&e- &7" + rankList.get(i)));
                        return true;

                    }
                }
            }

        }

Can anyone tell me why the plugin is not getting the list of strings under "groupNames" and its only getting the first string listed?

#

this was working before, not sure what I did

shell moon
junior shard
#

LOL

#

fuck me

#

I need to open my eyes

#

Thanks smh

shell moon
junior shard
#

imagine putting the return statement before the close bracket of the loop

#

couldnt be me

proud gale
#

can someone help me

shell moon
#

i think ?help can fix your issue

proud gale
#

?help

neat pierBOT
#
FAQ Answer:
» Give the helpers some details
» Ask suitable questions
» Be polite
» Wait

Source

proud gale
#

[05:05:14 ERROR]: [PlaceholderAPI] failed to load class files of expansions
java.util.concurrent.CompletionException: java.lang.NoClassDefFoundError: me/blackvein/quests/quests/IQuest
at java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:315) ~[?:?]
at java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:320) ~[?:?]
at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1770) ~[?:?]
at java.lang.Thread.run(Thread.java:833) ~[?:?]
Caused by: java.lang.NoClassDefFoundError: me/blackvein/quests/quests/IQuest
at java.lang.Class.getDeclaredMethods0(Native Method) ~[?:?]
at java.lang.Class.privateGetDeclaredMethods(Class.java:3402) ~[?:?]
at java.lang.Class.getDeclaredMethods(Class.java:2504) ~[?:?]
at me.clip.placeholderapi.expansion.manager.LocalExpansionManager.lambda$findExpansionInFile$7(LocalExpansionManager.java:396) ~[PlaceholderAPI-2.11.1 (2).jar:?]
at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768) ~[?:?]
... 1 more
Caused by: java.lang.ClassNotFoundException: me.blackvein.quests.quests.IQuest
at java.net.URLClassLoader.findClass(URLClassLoader.java:445) ~[?:?]
at java.lang.ClassLoader.loadClass(ClassLoader.java:587) ~[?:?]
at java.lang.ClassLoader.loadClass(ClassLoader.java:520) ~[?:?]
at java.lang.Class.getDeclaredMethods0(Native Method) ~[?:?]
at java.lang.Class.privateGetDeclaredMethods(Class.java:3402) ~[?:?]
at java.lang.Class.getDeclaredMethods(Class.java:2504) ~[?:?]
at me.clip.placeholderapi.expansion.manager.LocalExpansionManager.lambda$findExpansionInFile$7(LocalExpansionManager.java:396) ~[PlaceholderAPI-2.11.1 (2).jar:?]
at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768) ~[?:?]
... 1 more

#

how to fix it?

shell moon
#

is that your plugin?

brittle thunder
#

[05:05:14 ERROR]: My life

how to fix it?

proud gale
#

yeah

proud gale
#

[05:05:14 ERROR]: [PlaceholderAPI] failed to load class files of expansions

shell moon
#

well, error says

#

the class couldnt be found

#

so class is not there

proud gale
#

so how ti fix it?

shell moon
#

make sure it exists

proud gale
#

yeah how?

shell moon
#

its your plugin

#

if the class cannot be found

#

then it doesnt exists

#

i dont dm

proud gale
#

but im arleady install the plugin

shell moon
#

maybe send some code

#

error says it doesnt exists

proud gale
#

when i use /papi ecloud download quest, its error, but im arleady install quest

shell moon
#

plugin or expansion

#

wait

#

is that your plugin

#

you made it

#

or not

proud gale
#

its not my plugin

shell moon
#

I asked

#

this channel is for support with development

proud gale
#

no its not my plugin

shell moon
#

(your own plugin)

proud gale
#

typo

shell moon
#

but its 1:30 am

#

i dont think someone might reply soon

#

try asking the dev of that plugin

night ice
junior shard
#

I am making a command where someone request to appoint another player to a rank

When the player receives the request to be appointed to a rank, they run /appoint accept and from there it should set their group.

How can I pull the variable targetrank to the accept command so that when the player runs /appoint accept, it will know what rank they were requested to be appointed to

thorn cape
#

Hey I was looking around for a way to intercept messages being sent to players but I only found a thread from 2014 does anything know how to do this today? Or would it be more or less the same.

The reason I ask is because I have no knowledge of packets but I know I would need to modify them in order to do this.

I plan to implement a translator for bedrock players on java servers because tellraw messages cannot be read by bedrock afaik

https://bukkit.org/threads/tut-intercept-and-edit-all-messages.98620/

past ibex
shell moon
#

What? Translate? Translate what? Text to different language?

shell moon
#

Most cases you use hashmap with admin uuid as key and class with steps or data modified as value

#

Like when you make a arena setup system

junior shard
#

forgot bout that

waxen tree
#

pc

trail burrow
#

having issues with JitPack, I believe its because my pom file is not complete. for the libraries I'm missing in pom I'm using jars is this my issue?

trail burrow
#

can't figure out the version I need to use, nothing works, latest and all the versions I have used

#

takes 20 min to time out on a build on github

trail burrow
#

I think it has to do with my upstream broke somehow and it stopped updating GitHub

atomic trail
sage swan
#

On version 1.7.10
Cannot get events to work outside of my main class.
Have looked on plenty of forums with no solution seeming to help.
functions that are events work when called from main, I have included my @EventHandler as needed.
Need events to be fired in classes that aren't main.
https://paste.helpch.at/civiletufa.java
Here is basic structure without a lot ommitted to save space. There are ZERO script errors, everything else works fine.

grim oasis
#

try to register all the listeners in the main class I feel
I personally have never seen them registered inside their own constructor, but maybe it works

#

oh wait I don't even see you making an instance of them

sage swan
#

I didn't include the actual event functions as they are large and not really relevant to it not working
I can if you feel it's needed.

grim oasis
#
  public void onEnable() {
    getServer().getPluginManager().registerEvents(this, this);
    getServer().getPluginManager().registerEvents(new Menu(this), this);
    getServer().getPluginManager().registerEvents(new Listeners(this), this);
  }
sage swan
#

I see, I'll give it a whirl.

grim oasis
#

(also will probably want to remove the registering from the constructors)

sage swan
sage swan
#

Yeah that's what I'm running through rn

#

Alright, that issue appears to be resolved!
Thank you so much, I've been going at that issue for a good 4 hours.
I'm in a unique circumstances regarding this plugin and have basically had to learn everything over the past couple days

junior shard
#

How can I stop the code from progressing in my listener? Similar to how return true; stops the code from continuing with command classes

pulsar ferry
#

The same way, return;

junior shard
#

just return no true/false

pulsar ferry
#

Yeah

junior shard
#

I did that earlier and it made the plugin go wack

trail burrow
#

looking to figure out how to fix my JitPack, need to know if JitPack needs a artifact for it to work'

junior shard
shell moon
#

why?

#

you are already looping all recipients

#

cant you simply make a boolean foundPlayer = false;

#

and then update it to true if one is on range

#

so you get the boolean after the loop?

junior shard
#

ye got it ty

shell moon
#

still wondering

#

why you check online players size inside the loop lol

grim oasis
#

coming full circle to mschat

night ice
shell moon
#

Java is all logic

#

He should try reading its code as a text

#

To figure out the weird things

trail burrow
#

how does one block this warning [22:53:02] [Server thread/WARN]: Ironic_8b49 moved too quickly! -2.659403109043197,0.0,12.071595443481812

past ibex
#

you can't

trail burrow
#

in not then how does essx not get this warning during tp

past ibex
#

Tell mojang to fix their netcode and hope they listen

#

as this is a vanilla issue

trail burrow
#

is there a way to get a list of commands from your plugin?

shell moon
#

prob reflections

#

or read plugin.yml

pulsar ferry
#

Getting the command map with reflection then you can get all commands

lyric gyro
#

I think you can do plugin.getDescription().getCommands() or something like that

#

(if they're in the plugin.yml, if you're registering them with a cmd framework or somehow else, gl)

dense drift
#

I was about to say that xd

trail burrow
#

I have tried plugin.getDescription().getCommands() but there was more afterwards, may of asked to much of it, I will test just this

#

Thanks

trail burrow
#

since I didn't have the code to my plugin at work I had to make a testing plugin to work on this code of getting commands, it returns lochelp={description=help, usage=/<command>} for each code. can I get just the command name been looking not having much luck it picking the right thing

winged pebble
trail burrow
#

yes, I have not work with maps much, I assume I can just grab the first string

zealous nacelle
#

So like im getting this error about my config

java.lang.IllegalArgumentException: The embedded resource 'config.yml' cannot be found in plugins\sumo-1.0.jar
        at org.bukkit.plugin.java.JavaPlugin.saveResource(JavaPlugin.java:193) ~[spigot-api-1.18.1-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.plugin.java.JavaPlugin.saveDefaultConfig(JavaPlugin.java:180) ~[spigot-api-1.18.1-R0.1-SNAPSHOT.jar:?]
        at com.mystats.managers.ConfigManager.setupConfig(ConfigManager.java:14) ~[?:?]
        at com.mystats.sumo.Sumo.onEnable(Sumo.java:21) ~[?:?]
        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:264) ~[spigot-api-1.18.1-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:342) ~[spigot-api-1.18.1-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:480) ~[spigot-api-1.18.1-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.craftbukkit.v1_18_R1.CraftServer.enablePlugin(CraftServer.java:521) ~[spigot-1.18.1-R0.1-SNAPSHOT.jar:3442-Spigot-699290c-62d9762]
        at org.bukkit.craftbukkit.v1_18_R1.CraftServer.enablePlugins(CraftServer.java:435) ~[spigot-1.18.1-R0.1-SNAPSHOT.jar:3442-Spigot-699290c-62d9762]
        at net.minecraft.server.MinecraftServer.loadWorld0(MinecraftServer.java:612) ~[spigot-1.18.1-R0.1-SNAPSHOT.jar:3442-Spigot-699290c-62d9762]
        at net.minecraft.server.MinecraftServer.loadLevel(MinecraftServer.java:414) ~[spigot-1.18.1-R0.1-SNAPSHOT.jar:3442-Spigot-699290c-62d9762]
        at net.minecraft.server.dedicated.DedicatedServer.e(DedicatedServer.java:262) ~[spigot-1.18.1-R0.1-SNAPSHOT.jar:3442-Spigot-699290c-62d9762]
        at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:994) ~[spigot-1.18.1-R0.1-SNAPSHOT.jar:3442-Spigot-699290c-62d9762]```
Ik that the error says its with my 21st line of Sumo class: 
```ConfigManager.setupConfig(this);```
which calls ConfigManager:
#
public class ConfigManager {

    private static FileConfiguration config;

    public static void setupConfig(Sumo sumo) {
        ConfigManager.config = sumo.getConfig();
        sumo.saveDefaultConfig();
    }

    public static int getRequiredPlayers() { return config.getInt("required-players"); }

    public static int getCountDownSeconds() { return config.getInt("countdown-seconds"); }

    public static Location getLobbySpawn() {
        return new Location(
                Bukkit.getWorld(config.getString("sumo-lobby.world")),
                config.getDouble("sumo-lobby.x"),
                config.getDouble("sumo-lobby.y"),
                config.getDouble("sumo-lobby.z"),
                (float) config.getDouble("sumo-lobby.yaw"),
                (float) config.getDouble("sumo-lobby.pitch"));
    }

}```
The plugin is 1.18.1 anyone know why this would be happening?
dense drift
#

Read the first line

zealous nacelle
#

yeah

#

I know about that the problem is that it is in the resources folder

#

and it is exactly config.yml

#

so idk what would be causing that error

dark garnet
#

is there a way to make certain hostiles ignored when a player tries to sleep and they r nearby?

past ibex
#

MobTargetEvent

#

EntityTargetEvent

#

getTarget() instance of Player && ((player) target).isSleeping) cancel event

dark garnet
shell moon
dark garnet
surreal lynx
#

Anyone know how to do this with the kotlin DSL?

jar {
    destinationDirectory.set(file("server/plugins"))
}
shell moon
#

what are you trynna do?

#

allow playuers sleep even when they are mobs close?

surreal lynx
#

Thought you were talking to me haha

shell moon
pulsar ferry
surreal lynx
#

Thank you, I have been trying to do that for longer than I should have 😅

trail burrow
#

If gitHub Desktop is working right when I update it should upload my changes, in my case it don't and then I get message that says can't update, master has no tracked branch.

thorn cape
# shell moon What? Translate? Translate what? Text to different language?
Hey I was looking around for a way to intercept messages being sent to players but I only found a thread from 2014 does anything know how to do this today? Or would it be more or less the same. 

The reason I ask is because I have no knowledge of packets but I know I would need to modify them in order to do this.

I plan to implement a translator for bedrock players on java servers because tellraw messages cannot be read by bedrock afaik

https://bukkit.org/threads/tut-intercept-and-edit-all-messages.98620/```
It was to use in order to catch messages sent to bedrock clients on a java server. So if the message was unsupported by bedrock it would be modified to work.
shell moon
#

if you plan to intercept all messages received by players

#

including action bar, text message, json messages, text in items, etc

#

you'll have to listen to probably many packets

dark garnet
#

figured it out

#
@EventHandler
public void onSleep(PlayerBedEnterEvent event) {
    Player player = event.getPlayer();
    if (event.getBedEnterResult() == PlayerBedEnterEvent.BedEnterResult.NOT_SAFE) {
        event.setUseBed(Event.Result.ALLOW);
    }
}```
shell moon
cinder forum
#

Hi guys, I'm trying to draw on image in Java. Draw in way that you give program x1, y1 and x2, y2 coordinates and it will fill the square/rectangle w specified color. What way do you recommend?

hoary scarab
cinder forum
#

I mean isnt there library for that?

#

like you give the lib 2 points, color and it do it for you

#

ok found it maybe

#

i will try it tomorrow

dusky harness
#

¯_(ツ)_/¯

cinder forum
#

g2d.drawRect good

dusky harness
pulsar ferry
#

Yeah like image

dusky harness
#

ohhhh

#

ic

thorn cape
#

Also quick question do I need to make my own switch statement to get Attributes from keys like generic.attack_damage or is there a way I can just send it through something like Material#matchMaterial (like does a method already exist?)

dense drift
#

You have to make your own method

formal crane
#

Is there any fix for an unmappable character?

cinder forum
formal crane
#

it already is

cinder forum
#

in the IDE

formal crane
#

or atleast i think

cinder forum
#

oh

#

wait

thorn cape
cinder forum
formal crane
#

Where in the IDE could i change it?

cinder forum
#

not sure have you tried google

thorn cape
#

It took 3 and a half hours but I finally did it pepeW

||I made a utility for converting a player's inventory to a json string. This include potion effects, enchants, attributes on Potion items themselves, as well as, weapon attributes & other meta data. The system allows you to parse and create JSON strings||

dense drift
#

Nice

sinful shard
uneven lanternBOT
#
@NotNull
Set<String> getKeys(boolean deep)```
Description:

Gets a set containing all keys in this section.

If deep is set to true, then this will contain all the keys within any child ConfigurationSections (and their children, etc). These will be in a valid path notation for you to use.

If deep is set to false, then this will contain only the keys of any direct children, and not their own children.

Parameters:

deep - Whether or not to get a deep list, as opposed to a shallow list.

Returns:

Set of keys contained within this ConfigurationSection.

sinful shard
dusky harness
#

it returns a Set which you can loop through:

#
for (final String world : getConfig().getKeys(false)) {
    Bukkit.broadcastMessage("World: " + world));
}
sinful shard
sinful shard
#
package me.mountmario.projectmario.worldcreator;

import me.mountmario.projectmario.ProjectMario;
import me.mountmario.projectmario.util.config.DataManager;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.jetbrains.annotations.NotNull;

public class WorldList implements CommandExecutor {
    public DataManager data;
    @Override
    public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command, @NotNull String label, @NotNull String[] args) {
        this.data = new DataManager(ProjectMario.getPlugin());
        for (final String world : data.getConfig().getKeys(false)) {
            System.out.println("World" + world);
        }
        return true;
    }
}
dusky harness
#

ohh oops i messed it up

#

it's getConfig().getConfigurationSection("worlds").getKeys(false)

#

since without the getConfigurationSection, you're just getting the base keys

#

instead of the keys in worlds

sinful shard
sinful shard
#

hello?

proud pebble
sinful shard
#

yea

proud pebble
#

calculating their stats when they login and setting them in a hashmap of uuid and stat value object might be a better idea.

#

if you were storing skill xp that would be more appropriate to store.

proud pebble
#

from your values that your storing your trying to copy the stats of hypixel skyblock

sinful shard
#

yes

proud pebble
#

why are you storing their stats?

sinful shard
#

um how else do they stay

proud pebble
#

well atleast from playing hypixel skyblock myself, the stats are calculated when you login and they are updated when you make a change such as equiping armor, switching your hand from item to item, equiping and deequiping pets, etc

#

then they are stored in a map such as a hashmap

sinful shard
#

thats what im oding

#

doing

night ice
#

Yea…but not the right way…

#

Java is an object oriented programming language…u can set up something like a PlayerStat object…serialize it and when player joins deserialise it and cache tht

lyric gyro
#

java Java is an Object Oriented language designed by James Gosling in 1995

icy shadow
#

shut up

#

you will pay dearly for this

lyric gyro
#

Lol

clever relic
#

Anyone know a good Python dev

#

Need them for a telegram bot

spiral prairie
#
                            The plugin 'lol
                            ' is a required dependency but was not found on this server! Please restart the server after you have added the missing plugin!
 =============================```
or
```=============================
                            The plugin 'lol' is a required dependency but was not found on this server! Please restart the server after you have added the missing plugin!
 =============================```
wintry grove
#

how to do NMS on paper 👉 👈

#

like setup

broken elbow
dusky harness
broken elbow
#

well actually not even first.

#

hm idk. bye

spiral prairie
#

awesome

dusky harness
# spiral prairie

also i'd recommend running it in Bukkit.getScheduler().runTask if it's not already so that the server owner will prob see it (since thats when the server is started up)

#

¯_(ツ)_/¯

dusky harness
#

hm

#

or add it to plugin.yml but then some owners can't read the error

#

¯_(ツ)_/¯

spiral prairie
dusky harness
#

ah

#

ripp

spiral prairie
#

and its only PLib

#

soo

#

most people will already have it

#

its mostly for the suckers around there

#

idek

dusky harness
#

i've seen so many server owners ask for help bc they dont have plib

lyric gyro
#

the server already tells you what dependency plugins are missing tho

dusky harness
#

and they dont read the plugin page either 🙃

spiral prairie
#

no one wants to read that

#

especially new server owners

#

installing plugin

lyric gyro
#

if they can't be bothered to read an error, they won't bother reading your message either

broken elbow
spiral prairie
#

exactly

dusky harness
#

i have idea

broken elbow
#

and they just assume the plugin is at fault when they see that

spiral prairie
dusky harness
#

but since its not stacktrace

spiral prairie
#

because java stuff

dusky harness
#

they might read it

spiral prairie
dusky harness
#

oh

#

🥲 mb

broken elbow
#

Logger#error tho 😦

spiral prairie
broken elbow
#

😦

lyric gyro
#

SLF4J 2 🥺

wintry grove
lyric gyro
wintry grove
#

ty

#

Plugin [id: 'io.papermc.paperweight.userdev', version: '1.3.4'] was not found in any of the following sources:

#

welp

#

guess gotta move to .kts

lyric gyro
#

did you add the repo to the plugin management repos?

wintry grove
#

yes

#

wait no I didnt

#

stupid

#

Could not set unknown property 'maven' for repository container of type org.gradle.api.internal.artifacts.dsl.DefaultRepositoryHandler.

pluginManagement {
    repositories {
        gradlePluginPortal()
        maven = "https://papermc.io/repo/repository/maven-public/"
    }
}
#

how is it on groovy DSL? lol

dusky harness
#

id guess maven { url = "..." } 🤷

wintry grove
#

my bad

#

I'm just stupid and forgot how to do it kekwhyper

#

I guess that with the paperDevBundle thing and with the other one you dont need to set compileOnly 'io.papermc.paper:paper-api:1.18.1-R0.1-SNAPSHOT' anymore right?

#

also

Cause: paperweight requires a development bundle to be added to the 'paperweightDevelopmentBundle' configuration, as well as a repository to resolve it from in order to function. Use the paperweightDevBundle extension function to do this easily.
#

nevermind its loading

wintry grove
#

it worked ty

cerulean birch
#

probably a dumb question, but:
Is manually serializing an object using JsonObject and adding each needed field as a value, then manually deserializing it (using a static factory method with JsonObject as parameter) faster than using an automatic databinder, such as Jackson's ObjectMapper with annotations or Gson#fromJson()?

I'm assuming yes, but I just want to make sure that data binding doesn't do some weird magic that lets it serialize/deserialize objects faster

wheat carbon
#

yes, but, I'm 99.9% sure you're doing useless micro optimisation

cerulean birch
#

i'm not doing it for optimization, my objects had a weird serialization pattern and i felt like it would just be faster to code it manually than figure out a data-binding solution. I just wanted to make sure that doing it manually didn't de-optimize lol

#

ty for the help

wheat carbon
#

gson's custom serializers/deserializers are pretty easy to make

#

probably less effort than whatever manual solution you have in mind

cerulean birch
#

i was using jackson's objectmapper with annotations before, but i have a field that needs to be set when the object is constructed, and it isn't part of the json

wheat carbon
#

is the value based on the values of other fields?

cerulean birch
#

not really

wheat carbon
#

could you not just assign it in code then? like when you declare the field

cerulean birch
#

i have the main object "MainObject" and it has some fields that are "CustomObject"s, each "CustomObject" needs to have "MainObject" as a final field

#

MainObject has an "id" (long) that I previously just added to the json of every custom object

wheat carbon
#

couldn't you just have

cerulean birch
#

but having the same "id": long repeat several times in each json file, with there being hundreds of files

wheat carbon
#
private final CustomObject blah = new CustomObject(this);```
#

in MainObject

cerulean birch
#

um

#

no?

wheat carbon
#

why?

cerulean birch
#

MainObject is 95% of the time, deserialized from Json

#

and when it is, CustomObjects are also deserialized from that Json

wheat carbon
#

i see

#

what does customobject need an instance of mainobject for?

cerulean birch
#

    @JsonProperty("id")
    @Getter private final long id;

    @JsonProperty("name")
    @Getter private String name;

    // new company
    public Company(long id, String name) {

        this.id = id;
        this.name = name;


    }

    // company that existed before, should be deserialized
    public Company(@JsonProperty("id") long id,
                   @JsonProperty("name") String name,) {

        this.id = id;
        this.name = name;

    }

}```
#

and then there's some CustomObjects as fields as well

cerulean birch
#

in the company example above, CustomObject would be like a "Bank"

#

and that bank would need to know the company that owns it for some internal operations

#

i considered making all of those internal operations go through the Company, but I'd rather just have it as a field just in case

wheat carbon
#

aight, well, yeah, doing it manually shouldn't be any slower

cerulean birch
#

alright lol ty

thorn cape
#

Hey can someone recommend me a replacement for the bukkit configuration system because I'm at the point where I need more file control and I am inexperienced with java fileIO

wheat carbon
#

the next step is to start mapping your configs to actual objects

#

having classes that represent your configs instead of interacting with them through glorified maps

#

that can be achieved via libraries already in spigot, namely gson, or snakeyaml, or even a mix of the two (gson's object mapping abilities + snakeyaml's yaml parsing)

thorn cape
# wheat carbon that can be achieved via libraries already in spigot, namely gson, or snakeyaml,...

Thanks I'll look into those two. Currently I'm using some random library for json https://github.com/fangyidong/json-simple (or something like that)

GitHub

A simple Java toolkit for JSON. You can use json-simple to encode or decode JSON text. - GitHub - fangyidong/json-simple: A simple Java toolkit for JSON. You can use json-simple to encode or decode...

wheat carbon
#

yeah no point in using that

weak skiff
lyric gyro
#

nice pfp bro

ocean raptor
#

how can i find the key of an itemstack

#

nvm

lyric gyro
#

Hey, could someone help me with scoreboard-nametag stuff (call), I'm super stuck rn.

high edge
#

Ask away, noone gonna bother to get in a call

lyric gyro
#

Could someone help me picking a dedicated server plan?

terse belfry
#

yes

#

use pebblehost, you can get a 1 gig server for 1 dollar per month

lyric gyro
terse belfry
#

HeavyNode can give you 1.50 dollars per gig and a domain compatiable

lyric gyro
#

im looking for a 32-64 gb plan

#

im on reliablesite and im wondering what the best plan would be for that

terse belfry
#

ill look into it

lyric gyro
#

i9 9900k 64 gb is $115/mo

terse belfry
#

I dont think that would be necessary

lyric gyro
#

Intel Xeon E3 1230 V3 64 gb is 39-49 a month

terse belfry
#

the max isn't always the best

#

Intel Xeon E3 1230 Rapid Deploy 4 x 3.20 GHz 32GB DDR3 64GB SSD+2TB HD 10m $46/mo

#

Does that seem plausible?

lyric gyro
#

how many players will 32 gb support?

terse belfry
#

1 gig can hold 20 players usually

#

without lag

#

so like 640

dusty frost
#

well that depends on a lot of things

terse belfry
#

I think it would be find if you have about 100 average players and not 200 plugins

lyric gyro
#

its a simple plugin server

#

basically a large smp

terse belfry
#

what version?

dusty frost
#

do not allocate 32gb of ram to a single server please god

lyric gyro
#

1.17.1

#

32gb is going to be spread out

#

over multiple bungee cords

terse belfry
#

unless ur having like 600 players average don't dedicate that much

lyric gyro
#

@molten verge

dusty frost
#

minecraft servers don't scale vertically enough to use that much ram

terse belfry
#

uhm

#

try 8 gigs and have like 4 realms

dusty frost
terse belfry
#

that works fine

lyric gyro
#

actually probably not

terse belfry
#

I don't even understand how multiple proxies work

dusty frost
#

it doesn't very well

lyric gyro
#

well basically one of the games is going to have hundreds of players

dusty frost
#

minecraft doesn't have a transfer packet, so you're stuck on a single proxy

molten verge
#

1 bungee

#

3 servers

#

that was our plan

terse belfry
#

ok

lyric gyro
#

^

terse belfry
#

so make the bungee 2 gigs, and spread the 30 gigs thru the rest

molten verge
#

Yeah

#

that was the plan

dusty frost
#

definitely leave some room for the operating system

#

and stack sizes

molten verge
#

Also would 4 cores be enough? 1 for each one?

molten verge
dusty frost
#

remember, -Xmx5G is just 5GB for the heap

terse belfry
#

plenty

#

are u buying 4 separate servers?

lyric gyro
#

@dusty frost

molten verge
#

1 dedicated machine

lyric gyro
#

which one do you think is the best option

terse belfry
#

is that even possible?

#

I've never heard of that

molten verge
#

?

dusty frost
#

looks like an OVH reseller or somethin

molten verge
#

ReliableSite has its own reseller

terse belfry
#

same

lyric gyro
#

i talked to people and they like reliablesite

terse belfry
#

If they can't code a website link header right I don't think we can trust their website

molten verge
#

so if it looks like an ovh reseller than you can be a reseller of a reseller

#

They do seem legit

#

and a lot of people recommended it

terse belfry
#

obviously, that's the point of a scam to seem legit

molten verge
terse belfry
#

idk I trust pebble, they have amazing support no matter the time zones

dusty frost
#

I mean it literally just looks like an OVH reseller

#

their Ryzen 5600x 64GB one is the same as OVH's Game-1-LE server but for like $5 more a month aparently

#

i dunno, host depends on a lot of things

#

are you comfortable with a bare metal server with no support?

#

cause if not, you're gonna want to find someone who is or buy from a mc server host like pebble or something

molten verge
#

ReliableSite has support

dusty frost
#

yeah so does OVH technically

molten verge
#

Well yeah

#

but reliablesite actually answers

dusty frost
#

but good luck trying to use it to fix your minecraft server

molten verge
#

we already spoke to them like 3 times

lyric gyro
#

@dusty frost you see any good deals on OVH?

dusty frost
#

I mean, depends on what you're doing

terse belfry
#

what does VPS hosting mean

molten verge
lyric gyro
#

their i7 is out of stock unfortunately

molten verge
terse belfry
#

ik that

lyric gyro
#

i was thinking about waiting for an i7

#

because they are great price and performance

dusty frost
#

I use the Game-1-LE server for my network, 100 player cap, MythicMobs, Magic, MMOItems, ModelEngine

#

three servers behind a Waterfall, it's been great

#

a big upgrade from the free Oracle server lol

lyric gyro
#

can i have link

dusty frost
#

there's a lot of factors that weigh into this stuff

#

like, how much can you even spend on servers

lyric gyro
#

yea

#

tru

terse belfry
#

wait so a VPS is basically where you buy multiple servers as 1 bunch and it connects to your server through a proxy that you can alter where each server of the vps will be allocated?

dusty frost
#

uh

#

not really

lyric gyro
#

start

#

star

#

whats better i9 or 5600X

dusty frost
#

a VPS is where they run a machine with a hypervisor and make little VMs for you

dusty frost
#

i9 is a category

lyric gyro
#

9900k

dusty frost
#

ehhhh

lyric gyro
#

for minecraft?

#

server hosting

dusty frost
#

for the same price?

lyric gyro
#

i9 is $15 more monthly

#

for 64gb

#

im guessing i9 is slightly better

dusty frost
#

i mean, if ya really need that performance, yeah it's probably better

#

depends on if they can cool it adequately

#

intel 9th, 10th, and 11th gen run real hot

#

so good luck staying at 5GHz for long lol

lyric gyro
#

gotcha

#

thanks

#

whats better:

#

well we can either use Intel Xeon E3 1230 V3 32gb for $49 a month
or we can do a ryzen 5600x 64 gb for 99 a month
or we can do an i9 9900k 64gb for 115 a month

dusty frost
#

well, you obviously have a hierarchy of quality

#

now it's about price and need

molten verge
#

Well we need 1 bungee & 3 servers

#

these 3 servers will be a survival/war like minigames

dusty frost
#

big worlds? and how many people?

molten verge
#

around 100 max

#

or 200

#

The worlds are something like 5k per 5k

#

but not sure

dusty frost
#

100 and 200 are very different numbers lmao

molten verge
#

200 max

dusty frost
#

if ya have the money, the 5600x won't hurt ya

#

probably 8GBs per backend server and like 3GB for the proxy would be good

#

oh and use Velocity if you can

molten verge
#

Why not waterfall if I may ask?

dusty frost
#

Waterfall is just a slightly better BungeeCord, they are constrained by API and design choices made by md5

#

Velocity is a complete remake of a proxy and supports stuff like BungeeGuard natively, much better piece of software

molten verge
#

Hmmm ok

#

Is their API very different from the bungee one then?

dusty frost
#

a bit, yeah

molten verge
#

do they have nice docs for developers?

dusty frost
#

oh yeah

#

better than Bungee lmao

molten verge
#

Ok then I guess we can use it

#

I hope it is as easy as creating a bungee plugin xD

dusty frost
#

Would recommend using it out of the gate, we're working on migrating right now and it is a pain to move stuff over after the fact

molten verge
#

hmmmm ok

#

will use it then

#

also for panel Pterodactyl is the best choice yeah?

dusty frost
#

I would say so, I have been loving it

#

Whatever you do, Docker all the way man

#

it's unbeatable

molten verge
#

Yeah I also love pterodactyl

#

and the installation process is pretty easy

#

For the OS

dusty frost
#

do it in Docker if you can

molten verge
#

Ubuntu 20.04?

dusty frost
#

ehhhh

#

Debian 11's my choice

lyric gyro
#

hey star

#

if the i9 and the amd were the same price

#

which one woukld you do

molten verge
dusty frost
lyric gyro
#

reliablesite

dusty frost
dusty frost
molten verge
dusty frost
#

and besides, it doesn't matter much if you just put everything in docker, which I strongly recommend

molten verge
#

The docs already tell you how to setup it in docker yeah?

dusty frost
#

No, they tell you how to set it up on a host system

hidden galleon
#

hey are there any good documentations on how I can turn 1h into 3600 seconds?
I am trying to make a tempban command

Java 17.0.2
Maven build
Spigot 1.18.1 plugin
molten verge
hidden galleon
#

no but like, is there a good way to just parse the 1h which is given to the plugin as a command argument directly into seconds

hidden galleon
#

thanks, I will have a look into that

dusty frost
#

I don't know if I would do the daemon in docker, but at least the panel proper is super nice to have in Docker as it becomes portable

wheat carbon
#

can read human time

#

convert it to seconds, hours, whatever

hidden galleon
#

thanks a lot

wheat carbon
high edge
#

Oh hey Pig, you haven't been cooked yet?

wheat carbon
#

can't say I have

trail burrow
trail burrow
#

I was given this plugin and my knowledge of SQL is slim

#

this is the line it has a issue with HikariConfig config = new HikariConfig();

#

if you mean this, maven-shade-plugin is 3.2.4 and maven-compiler-plugin is 3.8.1

worn jasper
#

Am I stupid? java.lang.NoSuchMethodError: 'me.mrafonso.libs.kyori.adventure.text.Component org.bukkit.inventory.ItemStack.displayName()'

kind granite
#

paper api?

#

if yes then use the paper api's provided adventure and don't shade

molten wagon
#

is testing out the code so far and not everything is ready yet.

trail burrow
#

error: invalid target release: 16.0.1

trail burrow
#

@night icenot sure what you mean shaded HikariCP?

left crane
#

What would be required to add intergration deluxemenus for using a heads plugin i made? Or how does the process go
ping me when you reply

lyric gyro
#
    public void setNameTags(Player player) throws SQLException {
        player.setScoreboard(Bukkit.getScoreboardManager().getNewScoreboard());
        String[] rank = {"O" };
        for (String ranks : rank) {
            Team team = player.getScoreboard().registerNewTeam("O");
            team.setPrefix("&cOwner");
        }

        for (Player target : Bukkit.getOnlinePlayers()) {
            PlayerDataManager targetData = new PlayerDataManager(ArconixCore, target.getUniqueId());
            player.getScoreboard().getTeam(getRankPrefix(targetData.getRank()).substring(2)).addEntry(target.getName());
        }
    }```
neat pierBOT
lyric gyro
#

If someone could help with this error, that'd be fantastic.

#
    at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:310) ~[Arconix.jar:git-Spigot-21fe707-741a1bd]
    at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) ~[Arconix.jar:git-Spigot-21fe707-741a1bd]
    at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:502) [Arconix.jar:git-Spigot-21fe707-741a1bd]
    at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:487) [Arconix.jar:git-Spigot-21fe707-741a1bd]
    at net.minecraft.server.v1_8_R3.PlayerList.onPlayerJoin(PlayerList.java:298) [Arconix.jar:git-Spigot-21fe707-741a1bd]
    at net.minecraft.server.v1_8_R3.PlayerList.a(PlayerList.java:157) [Arconix.jar:git-Spigot-21fe707-741a1bd]
    at net.minecraft.server.v1_8_R3.LoginListener.b(LoginListener.java:144) [Arconix.jar:git-Spigot-21fe707-741a1bd]
    at net.minecraft.server.v1_8_R3.LoginListener.c(LoginListener.java:54) [Arconix.jar:git-Spigot-21fe707-741a1bd]
    at net.minecraft.server.v1_8_R3.NetworkManager.a(NetworkManager.java:231) [Arconix.jar:git-Spigot-21fe707-741a1bd]
    at net.minecraft.server.v1_8_R3.ServerConnection.c(ServerConnection.java:148) [Arconix.jar:git-Spigot-21fe707-741a1bd]
    at net.minecraft.server.v1_8_R3.MinecraftServer.B(MinecraftServer.java:814) [Arconix.jar:git-Spigot-21fe707-741a1bd]
    at net.minecraft.server.v1_8_R3.DedicatedServer.B(DedicatedServer.java:374) [Arconix.jar:git-Spigot-21fe707-741a1bd]
    at net.minecraft.server.v1_8_R3.MinecraftServer.A(MinecraftServer.java:654) [Arconix.jar:git-Spigot-21fe707-741a1bd]
    at net.minecraft.server.v1_8_R3.MinecraftServer.run(MinecraftServer.java:557) [Arconix.jar:git-Spigot-21fe707-741a1bd]
    at java.lang.Thread.run(Thread.java:833) [?:?]
Caused by: java.lang.IllegalArgumentException: Team name '[Ljava.lang.String;@5e74de87' is longer than the limit of 16 characters
    at org.apache.commons.lang.Validate.isTrue(Validate.java:136) ~[Arconix.jar:git-Spigot-21fe707-741a1bd]
    at org.bukkit.craftbukkit.v1_8_R3.scoreboard.CraftScoreboard.registerNewTeam(CraftScoreboard.java:139) ~[Arconix.jar:git-Spigot-21fe707-741a1bd]
leaden sinew
lyric gyro
leaden sinew
#

Can you show your code?

lyric gyro
#
    public void setNameTags(Player player) throws SQLException {
        player.setScoreboard(Bukkit.getScoreboardManager().getNewScoreboard());
        String[] rank = {"O"};
        for (String ranks : rank) {
            Team team = player.getScoreboard().registerNewTeam("O");
            team.setPrefix("&cOwner");
        }

        for (Player target : Bukkit.getOnlinePlayers()) {
            PlayerDataManager targetData = new PlayerDataManager(ArconixCore, target.getUniqueId());
            player.getScoreboard().getTeam(getRankPrefix(targetData.getRank()).substring(2)).addEntry(target.getName());
        }
    }
#

The error line is the Team team = player.getScoreboard().registerNewTeam("O");.

leaden sinew
#

Not sure then

surreal lynx
#

I believe you need to convert the StringArray back to a string

#

Not 100% sure, but I remember seeing something like this ('[Ljava.lang.String;@5e74de87') when I didn't convert my string arrays

lyric gyro
#
    public void setNameTags(Player player) throws SQLException {
        player.setScoreboard(Bukkit.getScoreboardManager().getNewScoreboard());
        Team team = player.getScoreboard().registerNewTeam("O");
        team.setPrefix("&cOwner");
        player.getScoreboard().getTeam("O").addEntry(player.getName());
    }
trail burrow
#

if I leave Hikari in my build of the jar my plugin works, is this a intellij issue?

kind granite
#

no that's what youre supposed to do

#

just relocate it to avoid conflicts with other plugins

#

even better, use maven/gradle

trail burrow
#

I'm using maven

#

maybe I used the wrong words

dense drift
#

Show your pom.xml

trail burrow
pulsar ferry
trail burrow
#

from artifact since I have 4 plugins I don't have maven info for

pulsar ferry
#

That's the problem, if you're using maven you have to build with maven

#

More specifically with mvn clean package

trail burrow
#

maybe I am, in Intellij there is nothing says maven build

pulsar ferry
trail burrow
#

when I do clean package it fails due to the missing maven dependency

#

guess I will try to find the missing dependency, was like over 20 when I first got plugin

pulsar ferry
#

You need to add all dependencies, don't mix build tools, if you have maven stick to only maven

lyric gyro
#

or whatever command afterwards

trail burrow
#

I have a button setup to do a clean build, but I will either need to remove plugins from project or find a maven info

#

JitPack for it to work I need to be able to build my project on GitHub?

kind granite
#

yeah you do

trail burrow
#

guess I will never fix my issue

pulsar ferry
#

Do you have the jar of the plugins?

trail burrow
#

yes, now thats mismatch

pulsar ferry
#

You can install it to maven local

mvn install:install-file \
   -Dfile=<path-to-file> \
   -DgroupId=<group-id> \
   -DartifactId=<artifact-id> \
   -Dversion=<version> \
   -Dpackaging=<packaging> \
   -DgeneratePom=true
#

Then add it to maven

lyric gyro
#

That's not really gonna fix it on the jitpack end of things tho

pulsar ferry
#

Yeah well jitpack is always gonna be shit for that (and everything)

lyric gyro
trail burrow
#

I think GitHub is messed up due to I forgot password and couldn't reset it so I started a new account

lyric gyro
#

That definitely doesn't help

#

Strongly suggest using a password manager

#

dashlane has about 1000 codes to get like 50 percent off from youtubers

#

good deals

#

Or use Bitwarden

#

FOSS

#

oh its free

trail burrow
#
[DEBUG] Looking up lifecycle mappings for packaging pom from ClassRealm[plexus.core, parent: null]```
fiery pollen
#

How do i add a part onto a string if the boolean is true/false without using a if statement

#

ive seen it before

#

it was like something ? "yes" : "no"

spiral prairie
fiery pollen
#

Thank you

trail burrow
#

I ran mvn install:install-file and got this

#

still not clear on how to use it

fiery pollen
#

Is it possible to change how fast a BukkitRunnable is running (delay) while its running

dusky harness
fiery pollen
#

hmmm true, but what if i want it run it faster

dusky harness
#

well if u run every tick

fiery pollen
#

Currently i have it like running every 30 seconds, and i want it to run after some time every 1 second.

#

Do i just start from the begging with every 1 second

dusky harness
#

yes - or create a new task

fiery pollen
#

Ow yeah, i'll just create a new task

dusty frost
#

so you can reference it in other projects if you really need to, for like local API changes and stuff

trail burrow
#

ok, how would I access it via pom?

#

I have this, <dependency> <groupId>me.staartvin</groupId> <artifactId>statz</artifactId> <version>1.6.2</version> </dependency> there don't seem to be any errors, but when I run clean build it still don't see this plug

dusty frost
#

yeah you add that, then you remove whatever repository the real one came from and add maven local as a repo

trail burrow
#

the issue is there no working repo for 5 of the plugins I'm using

dusty frost
#

maybe you can exclude that from the specific repo?

#

i dunno, i don't use maven

trail burrow
#

CMI-API says this works but not for me <dependency> <groupId>com.github.Zrips</groupId> <artifactId>CMI-API</artifactId> <version>8.7.8.2</version> <scope>provided</scope> </dependency>

warm steppe
#

imagine using maven

lyric gyro
#

How would I add an API to a gradle project?

#

implementation 'org.inventivetalent:bossbarapi:2.4.1'

#

That doesn't seem to work.

pulsar ferry
#

What exactly doesn't work there?

lyric gyro
#

When I try to reference the API, it just doesn't seem to work.

lyric gyro
pulsar ferry
#

Seems like that version no longer exists in the repo, try 2.4.3-SNAPSHOT

ocean raptor
#
        TextComponent textComponent = Component.text(PlaceholderAPI.setBracketPlaceholders(player, send.split("\\{message}")[0]));

        TextComponent hoverText = Component.empty();

        for (String str : plugin.getConfig().getStringList("hover")) {
            str = PlaceholderAPI.setBracketPlaceholders(player, str);
            hoverText.append(LEGACY.deserialize(str));
            hoverText.append(Component.newline());
        }

        textComponent.hoverEvent(hoverText);

        player.sendMessage(textComponent);
``` what am i missing?
#

i dont see the hover text

pulsar ferry
#

Components are immutable, either use the builder or you have to reassign the component

spiral prairie
#

how to i exclude paths that shouldnt end up in the shaded shadowJar?

pulsar ferry
#

Take a look at exclude or excludes on the shadow task, idk which one would be the one

pulsar ferry
#

Wdym by "exclude paths" though? ;o

spiral prairie
ocean raptor
#

i mean, what should i do

dense drift
#

you can exclude it from the library that uses it @spiral prairie

#
implementation(lib) {
  exclude group: 'org.yaml'
}```
spiral prairie
dense drift
#

run this

gradle dependencies

fiery pollen
#

Is there a way of setting a players location when the player leaves the game during the PlayerQuitEvent?

ocean raptor
spiral prairie
dense drift
#

com.google?

spiral prairie
#

gson

#

yaml is gone

dense drift
#

ok

#

use the same format for gson

spiral prairie
#

i did

dense drift
#

exclude group: 'com.google'

spiral prairie
#

yea

dense drift
#

send the script

spiral prairie
#

@dense drift

dense drift
#

does gradle dependencies not show you where gson comes from?

spiral prairie
#

it does

#

and i added it there

#

but it still existed

spiral prairie
#

argh

lyric gyro
#

Uh, what does this error mean?

#

java.lang.RuntimeException: java.lang.NoSuchFieldException: modifiers

spiral prairie
#

wthat you doing

icy shadow
#

you're doing something very cursed

lyric gyro
#

BossBar bossBar = BossBarAPI.addBar(player, new TextComponent("Hi " + player.getName() + "!"), BossBarAPI.Color.PURPLE, BossBarAPI.Style.NOTCHED_20, 1.0f, 0, 0);

#

Legit just that one line...

icy shadow
#

ok then that api is doing something very cursed

lyric gyro
#

Uhh, what do I do...

icy shadow
#

not much you can do really

#

make sure you're using the latest version

#

then either wait for the library author to fix, or use a different library

neat pebble
#

which spigot version are you running?

hushed badge
#

adventure 🙂

neat pebble
#

if it's 1.9+ you don't need that api

icy shadow
#

^

#

or there is always adventure

neat pebble
#

well, if he doesn't use paper

#

its quite overkill to add adventure just for a bossbar

icy shadow
#

i mean, the majority do use paper nowadays

#

but yea

#

it's a big library to add

lyric gyro
#

It's 1.8 Spigot.

neat pebble
neat pebble
#

that api is broken

icy shadow
#

or a different api

neat pebble
#

at least, when I tried to use it didn't work

neat pebble
#

at least known

lyric gyro
icy shadow
#

sucks to be a 1.8 user

lyric gyro
#

I've been stuck on bossbar's, tablist names, and nameplates for the longest time.

neat pebble
#

maybe you can try using TAB

#

i don't remember if it has api

lyric gyro
#

Caused by: java.lang.NullPointerException: Cannot invoke "me.neznamy.tab.api.bossbar.BossBarManager.createBossBar(String, float, me.neznamy.tab.api.bossbar.BarColor, me.neznamy.tab.api.bossbar.BarStyle)" because the return value of "me.neznamy.tab.api.TabAPI.getBossBarManager()" is null

neat pebble
#

can you send your code?

lyric gyro
neat pebble
#

do you have the plugin in your server?

#

@lyric gyro

lyric gyro
neat pebble
#

have you added as depend

#

¿

lyric gyro
#

Yes.

neat pebble
#

quite strange

#

oh

#

maybe

#

its because

#

1.8.8

#

XD

lyric gyro
#

Idek.

#

It should work though.

#

The plugin works but not my code @neat pebble:P.

neat pebble
#

i cant send images

neat pierBOT
neat pebble
#

but

lyric gyro
#

DM's?

neat pebble
#
 * Instance can be obtained using {@link me.neznamy.tab.api.TabAPI#getBossBarManager()}.
 * This requires the BossBar feature to be enabled in config, otherwise the method will
 * return null.
lyric gyro
#

Lemme check.