#help-archived

1 messages · Page 114 of 1

strange grove
#

it will run

stone rampart
#

Yeah so put hologram in a hashmap or arraylist depending on what you need to do with it

strange grove
#

and spawn an entity

#

hmm

stone rampart
#

How do you want to delete it?

#

By name?

strange grove
#

i guess so

#

if the name

stone rampart
#

So put it in a string:armorstand hashmap

strange grove
#

= the hologram I want

#

delete it

#

and the image with it

#

but

#

the image part does not concern you

#

just the hologram

stone rampart
#

Holy shit listen to me bud

strange grove
#

sry sry

stone rampart
#

Put the name and armorstand in a hashmap

strange grove
#

does it have to be a specific name?

stone rampart
#

Can be any name

strange grove
#

or can it be something like the command argument

stone rampart
#

And then you can get the armor stand with HashMap#get(name)

#

It can be the command argument yes

gleaming totem
#

Umm, I'm making a permissions plugin. and the spigot permissions only work for the first player logged in?

undone narwhal
#

See the name as an id

stone rampart
#

^

strange grove
#

ok

stone rampart
#

That people can refer to to delete and create

#

@gleaming totem why you out here making a permissions plugin lol

undone narwhal
#

@gleaming totem How do you add perm to your player?

stone rampart
#

Also you'd have to provide some code if you want help

gleaming totem
#

So Its based in bungee

#

but then I carry the spigot perms over

#
PermissionAttachment attachment = p.addAttachment(Main.getInstance());
        System.out.println(perms);
        for(String perm : perms){
            attachment.setPermission(perm, true);
        }
        attachments.put(p.getUniqueId(), attachment);
        p.recalculatePermissions();
undone narwhal
#

Is it a plugin for you / your network or a plugin to put on spigot ?

gleaming totem
#

both

#

there is a spigot version and a bungeecord version

#

this is the spigot version

undone narwhal
#

On spigot I mean the forum* sorry ?

gleaming totem
#

Private

undone narwhal
#

Okay, then I strongly advise you not to use Bungee/Spigot permission

#

Like for each player save a Set of String

stone rampart
#

I strongly advise against custom permissions plugins in general

#

It's basically reinventing the wheel

gleaming totem
#

its fun 😉

stone rampart
#

And so many good alternatives exist already

gleaming totem
#

still, anyone know why it would only work for the first player online?

undone narwhal
#

When do you add the attachment ?

gleaming totem
#

just after the player joins

undone narwhal
#

That's strange

#

I'm off, check that for you tomorrow

gleaming totem
#

have to delay the task by half a second so the bungee network has a player online to send the plugin message

#

Could that somehow be it?

strange grove
#

would I do hash map like this?

#

public HashMap <String, String > imgname = new HashMap<>();

gleaming totem
#

yes

strange grove
#

or did i do it wrong?

#

oh

gleaming totem
#

Just without some of the spacing

strange grove
#

ok

gleaming totem
#

like in between String and the >

strange grove
#

🙂

#

thx

sturdy oar
#

should annotations be excluded from final JAR product?

undone narwhal
#

Haven't test yet without it Fendi

#

(mention me if you test it)

sturdy oar
#

I'll do it tomorrow i think

#

technically yes because the code isn't relying on them

undone narwhal
#

Cool, yep it's midnight time to sleep (3 hours of maths in less than 8h damn)

sturdy oar
#

I also have Lombok in that project

undone narwhal
#

Yep annotations aren't used in the final production nah?

sturdy oar
#

no at least for lombok they automatically get translated into java when you compile

#

i just verified by decompiling my own jar

#

i had class marked as @Getter, i decompiled and annotation is gone, and there's all getters methods in class

#

only thing is that I still have this thing left that I have no idea where it comes from

undone narwhal
#

Is it heavy?

sturdy oar
#

249KB

gleaming totem
#

Anyone have any idea?

Umm, I'm making a permissions plugin. and the spigot permissions only work for the first player logged in?
@gleaming totem

PermissionAttachment attachment = p.addAttachment(Main.getInstance());
        System.out.println(perms);
        for(String perm : perms){
            attachment.setPermission(perm, true);
        }
        attachments.put(p.getUniqueId(), attachment);
        p.recalculatePermissions();

@gleaming totem

gleaming totem
#

So the error was that the plugin message only sent under the name of the first player that joined

#

which is weird because it was told to send under a different player

fathom shard
proper cairn
#

When I run the server through intellij in debug mode asks me to agree with eula.txt but no eula.txt is being populated

still timber
#

since ItemStacks support 1.16 custom colors for display names, shouldn't setDisplayName really take BaseComponent[] instead of String?

terse schooner
#

Would anyone happen to know how I could go about making unbreaking 3+ effective? I'm looking to make leather armor as durable as diamond via enchants

frigid ember
#

just give the leather armor unbreaking 5

#

by using unsafeenchantments

fallen stream
#

Is anyone here aware of guides for porting an existing vanilla server to spigot? I haven't found anything so far

pastel condor
#

the worlds can be converted, besides that there isn't much to convert

fallen stream
#

What's the conversion process like? I see some posts on the forum here and there but it's all from like 2016

pastel condor
#

just drag the worlds into a folder with the spigot jar I think

#

I mean thats what I did

acoustic temple
#

What are the Strings of a Team object's entries? like, when you do (some team).getEntries(), what is the kind of stuff its returning?

pastel condor
#

the java docs should say?

acoustic temple
#

Where do I check that? Sorry, I'm new to this

pastel condor
#

I'll give you a link one sec

#

it might look like a mess at first, but I would recommend using the search feature in the top right corner

acoustic temple
#

Thank you!

pastel condor
#

np

acoustic temple
#

I've tried printing out individual entries since they're strings, but it doesn't seem to work

pastel condor
#

they are the entity object

#

not a string

#

if thats what you mean?

acoustic temple
#

I think so? i just don't understand why it says it's returning a set of strings

#

When you do getEntries()

pastel condor
#

oh my bad

#

I read it wrong lmao

#

I though it said gets the enties on the team

#

it should return a string set

#

then you can loop through the set

#

or do something with it

acoustic temple
#

oop, np

#

yeah I'm trying to do that atm
i think something's wrong with the command i wrote to print out everything in the set

pastel condor
#

ah I see

frigid ember
#

I am trying to see what all of the craftbook features do

#

It doesnt load

terse schooner
#

@frigid ember unbreaking higher than 3 does nothing

#

Or, well, it does as much as unbreaking 3

frigid ember
#

That's untrue.

terse schooner
#

in 1.15.2?

#

I've tried vanilla, essentials, mythic mobs artifacts

#

Any time I enchant it past unbreaking 5 via any means, no luck.

#

also yes unsafe enchants are enabled, unless there's another one other than essentials

frigid ember
#

hi guys, is this the proper way of reloading a config?

Main:

    public void reload() {
        reloadConfig();
        config = getConfig();
    }

Command:


        if (args[0].toLowerCase().equalsIgnoreCase("reload")) {
            plugin.reload();
            return true;
        }

If not, how do I?

terse schooner
#

If anyone has an answer or ideas why unbreaking past 3 isn't working for me.. I'm all ears. I've been trying to resolve this for like 3 weeks at least, with nooo luck

frigid ember
#

Does anyone know why old methods for removing the player death screen are no longer working for 1.15? I've looked up some methods for 1.13 and 1.14 but none of them seem to work properly. Here is my current code.


                @Override
                public void run() {
                    player.spigot().respawn();
                }
            }.runTaskLater(JavaPlugin.getPlugin(Main.class), 2L);
            player.setHealth(player.getAttribute(Attribute.GENERIC_MAX_HEALTH).getValue());
            ...```
And yes, the DeathEvent is being registered.
proper cairn
#

how do you use multiple commands in one yml file

#

use yml file is new to me and i dont know how to structure it

#

can you even use more than one command in a yml file

frigid ember
#

@proper cairn what do you mean by commands

#

Does anybody have this?

#

?paste

worldly heathBOT
frigid ember
#

I keep getting this error https://paste.md-5.net/comasivafo.shell

    public static final String DEFAULT = "DEFAULT";
    /**
     * Get a rank from the string used in config
     * 
     * @param key The Path used in config
     * @return A Rank
     */
    @Nonnull 
    public Rank getRank(String key) {
    Rank rank = ranks.get(key);

    Bukkit.getConsoleSender().sendMessage(key);
    Bukkit.getConsoleSender().sendMessage(key);
    Bukkit.getConsoleSender().sendMessage(key);
    Bukkit.getConsoleSender().sendMessage(key);
    Bukkit.getConsoleSender().sendMessage(key);
    Bukkit.getConsoleSender().sendMessage(key);

    if (rank == null) {
        if (ranks.get(DEFAULT) == null) {
        rank = new Rank(DEFAULT, "&7", "&7", 0);
        ranks.put(rank.getKey(), rank);
        } else {
        rank = ranks.get(DEFAULT);
        }
    }
    return rank;
    }

But rank is non null

proper cairn
#

Like how would i get that second plugin to work in the yml file

ashen stirrup
#

@proper cairn wdym?

proper cairn
#

Second command sorry

#

I have a second command called flyCommand

#

like basically how do i get register two commands in the yml file

ashen stirrup
#

I see

proper cairn
#

so i can type in the command within the server

#

to get it to work

ashen stirrup
#

I don’t believe that would work since onCommand is extended from JavaPlugin as an event whereas FlyCommand isn’t written in the JavaPlugin class

#

However, you can do this:

if(cmd.getName().equalsIgnoreCase(“test”){
    // Do Something
} else if (cmd.getName().equalsIgnoreCase(“test2”){
    // Do Something Else
}
#

I believe

#

If not, you can make it a multi class plugin where the subclasses for the command implement the CommandExecutor interface

#

(Correct me if I’m wrong)

#

^^ You’d then need to register the command in the Main Class onEnable method, you’d just need getCommand(String commandName).setExecutor(new (ClassName), this);

#

e.g getCommand(“fly”).setExecutor(new FlyCommandClass(), this);

terse schooner
#

@frigid ember So I think I found out what's up, uh. You can enchant armor with unbreaking but it quickly starts doing less and less, and does no more by like level 15 or so

#

either way, the increases are so small that you reach a max of like 50% and it doesn't go any higher, so.. even unbreaking 999 on leather pants will only make it last 1.5x as long. I need some way to do more, to make leather last as long as unbreaking 3 diamond armor

frigid ember
#

change its durability then

#

sure there is a way you can go above its default durability

#

I don't know that way though, can't be much help there

meager heart
brittle garden
#

I have an issue where about 9080 chunks are staying loaded in, persistent over restarts. Including when players haven't logged into the server after the restart. I've removed every plugin from my server as well, and the chunks are being loaded even before players can log in. Is there something i can check that may be forcing them to pre-load and stay force-loaded?

vernal plank
#

Is there an event for when two chests merge into a double chest

ashen stirrup
plush river
ashen stirrup
#

Do many Java courses teach ternary operations and assignments?

plush river
#

@ashen stirrup probably, hopefully

#

it's easy though, it's just

Object assignment = condition ? optionTrue : optionFalse;
// or
condition ? optionTrue : optionFalse; // these can represent method calls or whatnot
ashen stirrup
#

I know, is it better to teach how to do it rather than efficiency though

#

If Else statement is easier to understand but ternary statements are more efficient

frigid ember
#

How do you get rid of the Death Screen when a player dies? It used to be fine with 1.12 and older with just setting the player's health to full. Why isn't this working now? Asking for 1.15.2

ashen stirrup
#

I may be wrong on this but you can try it, on the death event, try adding Player.spigot().respawn();

frigid ember
#

I tried that.

#
            new BukkitRunnable() {

                @Override
                public void run() {
                    player.spigot().respawn();
                }
            }.runTaskLater(JavaPlugin.getPlugin(Main.class), 1L);```
#

It still shows the death screen. I click Respawn and it doesn't do anything, but the screen is annoying nontheless.

vast trench
#

Can someone help me

#

I need help with the towny plugin

ashen stirrup
#

Do you need the runnable?

#

@vast trench , what’s yo?

#

up*

frigid ember
#

I can try it without. Although, I heard that it needs to be a one tick delay... Let me try without the runnable.

vast trench
#

@ashen stirrup hey ok, so basically I have this annoying chat in-game that I am trying to get rid of and I traced it to Towny. How do I get rid of it?

#

I would post screenshots but I can't rip

ashen stirrup
#

Try looking through the config files for possible configurable messages. If worse comes to worst then you can decompile the plugin and remove it but the plugin maybe source code may be obfuscated.

vast trench
#

any tips for ctrl + f for

ashen stirrup
#

Wdym tips?

vast trench
#

if I am going to find something in the config what should I look for

#

I am new to this :/

ashen stirrup
#

The message lmao

frigid ember
vast trench
#

well, when I type it says [g] [worldname] Default Soupz_ (which is my gt)

ashen stirrup
#

Probably long winded but you can check on the EntityDamageEvent if their health is <= 0, then respawn them

vast trench
#

like how tf I get rid of these stupid prefixes and stuff

ashen stirrup
#

Are you trying to remove the world name?

vast trench
#

Yessss

frigid ember
#

Probably long winded but you can check on the EntityDamageEvent if their health is <= 0, then respawn them
@ashen stirrup Sounds like a plan, thanks.

ashen stirrup
#

/mvm set hidden true

#

@vast trench

vast trench
#

and the [g] and Default

#

I dont have multiverse

ashen stirrup
#

Essentials Chat?

vast trench
#

yeah

#

is that why?

#

I just came from essentials support

ashen stirrup
#

Check the format for Essentials Chat in the config.yml

vast trench
#

ok

lethal shell
#

can someone help me with uSkyBlock? I keep typing in “/island” on my server but it just keeps saying “/island help”
I have all the stuff needed installed

cursive lily
ashen stirrup
#

Have you added the Spigot JAR file as an external library?

cursive lily
#

you mean how i download the spigot server .jar thing and put it into something then yes

#

lmao sorry its my first time

ashen stirrup
#

Show me where you put it

cursive lily
#

ok

frigid ember
#

@cursive lily make sure your plugin.yml file is named "plugin.yml" not "Plugin.yml" 👍

ashen stirrup
#

I recommend using JDK 8 not 13

cursive lily
#

oh sorry

#

ok so how do i do that the @ashen stirrup

ashen stirrup
#

I’m not too good with Eclipse, but search up JDK 8 online and download it

cursive lily
#

ok thanks

lethal shell
#

is anyone able to help with skyblock?

ashen stirrup
#

Try checking if the plugin has a support discord

cursive lily
#

thanks

lethal shell
#

Thanks

frigid ember
#

@ashen stirrup Would the fact that I'm using Paper Spigot affect the issue I'm having? 👀

ashen stirrup
#

Not too sure in all honesty, Paper Spigot is supposed to be more optimised

frigid ember
#

Yeah that's what I was thinking.

cursive lily
#

@ashen stirrup sorry

frigid ember
#

This is so weird, I have no idea why this is such an annoyance.

ashen stirrup
#

Yes that one

cursive lily
#

ok thanks

ashen stirrup
#

And I’m not sure if it overrides the respawn event

frigid ember
#

It might.

ashen stirrup
#

Try with normal spigot?

frigid ember
#

I find it annoying how 1.15.2 literally changed so many things with the api

#

I had chunk unloading/loading which was an easy fast way to reset maps and then they just dont work anymore so I had to resort to annoying region block placing creating my own schematics and what not.

ashen stirrup
#

I agree, I believe the Inventory.getTitle() was made harder to access, I think you have to go through Inventory.getView().getTitle() for InventoryClickEvent or Inventory.getHolder().getTopInventory().getView().getTitle()

frigid ember
#

Yeah stuff like that

#

Do they just have a list of everything that was changed over the past few major updates without causing an anyuerism to read?

ashen stirrup
#

Might cause a slight anyuerism

frigid ember
#

And also regular spigot doesn't do anything different. 🤷

#

Might cause a slight anyuerism
@ashen stirrup Ah lovely.

ashen stirrup
#

Different to what

frigid ember
#

Doing what it did before.

#

Not skipping the screen

#

Ok so there is an update for a "Respawn API" that he makes note of

frigid ember
#

Aight I just might as well create a spigot thread for this smh

#

Thanks for the help

cursive lily
#

ok so i installed it do you know how to change it over to 8

ashen stirrup
#

I don’t use Eclipse but that should help

cursive lily
#

ok thanks

ashen stirrup
#

How experienced are you in terms of Java?

cursive lily
#

nothing sorry

#

is this right

ashen stirrup
#

Yes

cursive lily
#

ok thanks

ashen stirrup
#

Then import your Spigot JAR file

cursive lily
#

so i have to redo it right

ashen stirrup
#

You should because I don’t think you have imported it correctly

cursive lily
#

yer that probably true

#

ok thanks

ashen stirrup
#

Working?

cursive lily
#

1 min im very slow lmao

#

im gonna get a new spigot file because i use the other one to create a new server for testing

ashen stirrup
#

Okay, imma sleep now since it’s 5am for me and I haven’t slept so gn, good luck

cursive lily
#

ok thanks

wispy kettle
#

Is vault also a chat manager and perms manager?

tacit wolf
#

Hey guys does anyone here know how to allocate more cpu cores to a server using mcmyadmin?

undone narwhal
#

Yes BlackShepp

#

Nop sorry Mayournaise

tacit wolf
#

ok

marsh hawk
#

Anyone here ever tried making their own perms plugin? i'm thinking about making one, just wondering if they're a huge burden to make

undone narwhal
#

Working with perms with Spigot/Bungee is really annoying ^^ Good luck

red zenith
#

@marsh hawk Go check out the source code for LuckPerms, if you want an idea of the scope or difficulty.

marsh hawk
#

LuckPerms is pretty over engineered though. So i don't feel it'd be an accurate representation

cursive flax
#

Hello, I'm trying to disable explosions on blocks that haven't been placed by players and that are not End Stone or Glass, for my Bedwars minigame plugin, and I tried this code but it doesn't work, I don't really understand why. Thanks in advance for your help ! 😄

    @EventHandler
    public void onExplosion(BlockExplodeEvent event) {
        List<Block> blocks = event.blockList();
        for(Block block : blocks) {
            if(main.getWhitelistedBlocks().contains(block)) {
                if(block.getType().equals(Material.END_STONE)|| block.getType().equals(Material.WHITE_STAINED_GLASS)) {
                    event.setCancelled(true);
                }
            }
        }
    }```
red zenith
#

Well, I wouldn't use anything else, over engineered or not, it works well and has a lot of good features.

marsh hawk
#

@cursive flax if you're gonna have a huge list of block types I'd suggest using an ImmutableSet

undone narwhal
#

@cursive flax Do not cancel the event, but just remove blocks you don't want to explode from the blockList

cursive flax
#

oh ok

#

there are not many block types in my list , like only 5 or 6 btw

undone narwhal
#

if (main.getWhitelistedBlocks().contains(block) || block.getType().equals(Material.END_STONE)|| block.getType().equals(Material.WHITE_STAINED_GLASS)) {
event.blockList().remove(block);
}

#

But be careful of ConccurrentModificationException

cursive flax
#

But be careful of ConccurrentModificationException
@undone narwhal then I should add all blocks to remove in another list and then remove all the content of the list from the blockList ?

#

So the modifications are made out of the for loop

undone narwhal
#

I think so yes

dark shuttle
#

there is removeIf i believe, which is concurrent safe

undone narwhal
#

Also if you like lambda Java8

#

(Which I recommand)

dark shuttle
#
BlockExplodeEvent#blockList().removeIf(main.getWhitelistedBlocks::contains)
cursive flax
#

I tried removing blocks from the blockList and it still explodes and does damage to blocks :/

dark shuttle
#

it seems that the list is immutable

cursive flax
#

oh

#

what should I do then ?

undone narwhal
#

Hum

#

That's strange

#

What are the methods with event?

gleaming totem
#

@cursive flax you’re probably just going to have to get the block and set the type to what it was before

chrome lark
#

Read the javadocs for the event, pretty sure it tells you

cursive flax
#

I tried adding debug messages to the event

#

and it seems that the event doesn't even happen

#

like it's not detected

undone narwhal
#

Double check you havn't forgot to Bukkit.getPluginManager().registerEvents

cursive flax
#

all my events are in the same listeners class, and other events are working

undone narwhal
#

Where did you put the debug msg?

frigid ember
#

yo, is DustOptions used with Particle.FALLING_DUST?

cursive flax
#

@undone narwhal i put one for every iteration of the for loop, and one when the event is called

undone narwhal
#

And you got nothing?? That's strange

#

What's your version?

cursive flax
#

1.15.2

undone narwhal
#

:/

novel osprey
#

hi

#

i have a problem with this code

package me.redpy.tutorial.Events;


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 EventsClass 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) && block.getType().equals(Material.GOLD_BLOCK))
            player.sendMessage(ChatColor.AQUA + "Right click to feed yourself.");
        else if (action.equals(Action.RIGHT_CLICK_BLOCK) && block.getType().equals(Material.GOLD_BLOCK)) {
            if (player.getFoodLevel() != 20) {
                player.setFoodLevel(20);
                player.sendMessage(ChatColor.GOLD + "You have been feed.");
            }else
                player.sendMessage(ChatColor.RED + "You are not hungry");
            
                
        }
        
    }
    
}
#

when i click right it shows me i click twice

#

but i just click once

torn robin
#

Interact is called twice iirc in 1.9

#

once for each hand

#

event#getHand or something

sturdy oar
#

So i have one questione, is it correct to use synchronized on a getInstance() method?

#

inside a singleton uses lazy instantiation

novel osprey
#

Interact is called twice iirc in 1.9
@torn robin but the left click just once, and the right click twice, btw im working on 1.15.2

undone narwhal
#

I think so, have to check online "Thread Safe singleton"

sturdy oar
#

Thank you Rolyn

#

yeah im using it concurrently

floral isle
#

hi guys i am working on a system to convert old ids to config files like Wool: 1 is translated to 1.15.2 if anyone has any idea let me know thanks

torn robin
#

XMaterial might have that

undone narwhal
#

XMaterial is your best friend

floral isle
#

no you have not understood for example in a config file there are ids i would like to find a way to replace automatically in config with today's materials

undone narwhal
#

@sturdy oar You have 3 options: synchronize the getInstance(), synchronize(ClassName.class) or create a "holder"

sturdy oar
#

well Rolyn im using this right now

undone narwhal
#

That's enough nah?

sturdy oar
#

i guess so

undone narwhal
#

perfect

late wyvern
#

what would be the thing to play a notblock sound?

sturdy oar
#

Player#playEffect

#

if i remeber correctly

undone narwhal
#

no you have not understood for example in a config file there are ids i would like to find a way to replace automatically in config with today's materials
@floral isle Use XMaterials to get the Bukkit Material and then replace with the name in the config

#

Player#playNote maybe

floral isle
#

ah ok thx

sturdy oar
#

actually playNote yes @late wyvern

#

it's more specific for noteblocks

late wyvern
#

ah okay thank you

undone narwhal
sturdy oar
#

yeah the instrument is because noteblocks can have different sound effects

#

it makes sense

#

noteblock is affected by the block beneath it

torn robin
#

Instrument is an enum

undone narwhal
#

Right

sturdy oar
#

left

floral isle
#

ok because in my World generator i want to create a method to convert old config files

sturdy oar
#

Rolyn I accepted your friend request ❤️

#

either use someone's else library, or make an enormous switch yourself

#

it's not hard

#

just takes some time to read and map all the numbers

undone narwhal
#

I strongly advice you to use XMaterials ^^

flat valley
#

hi.
i want to add online players to the team.
but this code doesnt work. how do i fix this?

public class InitCommand implements CommandExecutor {

    @Override
    public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
        Logger log = sender.getServer().getLogger();

        ScoreboardManager sm = Bukkit.getScoreboardManager();
        Scoreboard scoreboard = sm.getNewScoreboard();

        Team playersTeam;
        if (scoreboard.getTeam("players") == null) {
            playersTeam = scoreboard.registerNewTeam("players");
        } else {
            playersTeam = scoreboard.getTeam("players");
        }

        for (Player player : sender.getServer().getOnlinePlayers()) {
            playersTeam.addEntry(player.getName());
            log.info("add" + player.getName() + "to the team");
        }
        sender.sendMessage("successfully added members to the team");
        return true;
    }
}
torn robin
#

well scoreboard is always going to have no teams since you're creating a new scoreboard

sturdy oar
#

xd

torn robin
#

so there's not really a point in checking if the team is null since it's always going to be null

#

also you're calling it twice that's not really necessary

#

how are you testing whether or not someone's added to the team?

undone narwhal
#

Am I the only one person to find Scoreboard Teams stuff a bit tricky?

torn robin
#

it certainly is yes

#

Teams and Objectives are confusing in general

undone narwhal
#

Yep...

flat valley
#

I ran /teammsg and saw the message that I wasn't on the team and thought it wasn't working properly.

#

scoreboard team and normal team is different thing...? if so, thats very difficult to understand

soft locust
#

Hey, i don't have access to nms with paper, I have to include spigot, is it normal ?

silk gate
#

yes

undone narwhal
#

Paper download the patched minecraft server in the cache folder. It is not including in the paper jarfile

soft locust
#

ok thx

umbral shoal
#

anyone familiar with bedwars?
if so, does anyone know how to fix this annoying issue that only 1 person can pickup items from the gen at the same time

Seriously, all help would be greatly appreciated as this is literally the only reason i wont be able to publish my server :(

Anyone, please?

#

im sorry but im pretty desperatelol

jaunty axle
#

Hello, is this the place where I can ask questions about my own server and sorting an issue out? Thanks

icy cosmos
#

@jaunty axle go ahead

jaunty axle
#

Simply put: my friends can't see skins and we are set to defaults. Sorry, just cannot find any online resources with a similar problem.

#

I did, however, change the server to a CraftBukkit server to allow plugins but as it is seen as a new server the players do not have there old data.

ashen stirrup
#

If your server is in OfflineMode then use SkinRestorer

jaunty axle
#

Alrighty, will have a look at it. Thanks for the help!

tiny dagger
#

guys

#

imma about to lose my marbles

#

didn't you asked the bedwars question already?

#

are there only 4-5 questions? lol

umbral shoal
#

i've asked the question before but there's a reason why im repeating it obviously

tiny dagger
#

do you think you'll get a different answear?

umbral shoal
#

there arent just 2 people on this server

tiny dagger
#

the bedwars plugin should allow the team to pick the item at the same time

#

if they are nearby

umbral shoal
#

yeah right

#

thank you

tiny dagger
#

i can show you

#

my bedwars plugin

umbral shoal
#

do you think you'll get a different answear?
i dont actually remember getting any answer lmao so so so sorry

tiny dagger
#

you did

#

lol

umbral shoal
#

oh

tiny dagger
#

i told you that my bedwars plugin doesn't have that issue lol

umbral shoal
#

i should pay more attention

tiny dagger
#

you can check it on gamster / herobrine servers

worn gate
#

I nead help pliz

torn robin
#

ask questions here, don't say you have them

tiny dagger
#

can we go back to repeated questions instead? 😂

turbid vapor
#

Does someone know the id of the Pling notification sound

sturdy oar
#

wut

#

IDs have been deprecated

turbid vapor
#

I can send you a link which sound i mean

sturdy oar
#

literally look at that enum

#

every sound is there

turbid vapor
#

I dont know what the name of that sound i9s

#

Thats the problem

undone narwhal
#

LevelUp with high pitch?

strange grove
#

hey does anyone know how to fix this?

#

List<Entity> nearbyEntites = l.getWorld().getNearbyEntities(l, 8, 8,8);

#

it keeps on underlining it in red

#

it saying required type list

ashen stirrup
#

Hover over it and it'll show you an error message

#

Oh

strange grove
#

but it was given an collection

#

it said

#

provided collection

undone narwhal
#

Collection<Entity>

strange grove
#

and i'm not sure why my code is mad

#

just do that?

undone narwhal
#

Try it, should do the job

strange grove
#

or are you restating my error @undone narwhal

#

oh

#

ok

#

thx man

#

well my codes not mad

#

thx

#

🙂

#

@undone narwhal

#

and

#

@ashen stirrup

undone narwhal
#

Your welcome

strange grove
#

thx man

#

you helped me with code i was searching for for months

#

love you no homo

#

🙂

hard crane
#

hey does anyone know what event is emitted when a player tries to fire a fake arrow (sent by a packet) or is it just projectile launch?

tiny dagger
#

when you say no homo makes it even more homo btw

strange grove
#

no

#

when you say no homo

#

it makess it no homo

#

it depends

#

if you say all homo

#

then that makes it more homo

#

but if you don't say that but say no homo

#

it removes the homo

tiny dagger
#

what about not saying it at all

#

lol

strange grove
#

homo.remove();

#

there

#

it is gone

tiny dagger
#

it's not like love you is sexualized imo

strange grove
#

if (instance of homo) {

#

homo.remove();

#

}

#

not letting people get the wrong idea

worn gate
#

How can i add a user a permission inside my plugin ?

strange grove
#

when I say it

#

so yea

tiny dagger
#

p.haspermission

hard crane
#

not what he ment

worn gate
#

yeah but how can i add the user a permission

tiny dagger
#

like in plugin.yml

#

?

hard crane
#

no

#

like a permission plugin

#

but i dont think thats possible

worn gate
#

Is it ?

hard crane
#

you could try just executing console commands from your permission plugin

strange grove
#

if player.hasPermission("Permission name here I think") {code that's gonna be executed if they have the permission btw this permission is just if they're oped}

#

so it's simple

hard crane
#

again not what he means

strange grove
#

wdym?

worn gate
#

no

hard crane
#

he doesnt want to know how to check for a permission

#

he wants to add it

worn gate
#

I would just like to add the user a permission

strange grove
#

that's adding a permission

#

right?

hard crane
#

no

strange grove
#

ok i'm confused

#

but i'm gonna let you take over chat eh?

hard crane
#

adding a permission in the sense of allowing the player to do stuff which requires that permission

worn gate
#

yeah

blazing swallow
#

How to suppress the log of Bungeecord? I don't want to write logs to file.

worn gate
#

I tried using this but it only works if ur op

if(inventaire.getName()== "Classes") {
            if(current.getType()==Material.BONE) {
                event.setCancelled(true);
                Bukkit.dispatchCommand(player, "lp user "+player.getName()+" permission set lg.perm");
                Bukkit.dispatchCommand(player, "lp user "+player.getName()+" permission unset vm.perm");
                Bukkit.dispatchCommand(player, "lp user "+player.getName()+" permission unset bk.perm");

            }
            if(current.getType()==Material.DRAGONS_BREATH) {
                event.setCancelled(true);
                Bukkit.dispatchCommand(player, "lp user "+player.getName()+" permission set vm.perm");
                Bukkit.dispatchCommand(player, "lp user "+player.getName()+" permission unset lg.perm");
                Bukkit.dispatchCommand(player, "lp user "+player.getName()+" permission unset bk.perm");
            }
            if(current.getType()==Material.DIAMOND_SWORD) {
                event.setCancelled(true);
                Bukkit.dispatchCommand(player, "lp user "+player.getName()+" permission set bk.perm");
                Bukkit.dispatchCommand(player, "lp user "+player.getName()+" permission unset vm.perm");
                Bukkit.dispatchCommand(player, "lp user "+player.getName()+" permission unset lg.perm");
            }
hard crane
#

do you get any errors

worn gate
#

no

#

cuz you can only open this menu if u don't have any of these permissions

vernal spruce
#

if(inventaire.getName()== "Classes") is that checking true? is the name with no color or anything just Classes?

worn gate
#

so the only way is to open the menu and then op yourself

ashen stirrup
#

You compare strings with equals() or equalsIgnoreCase() not ==

vernal spruce
#

also "disaptchCommand(player)"

#

its basically mimicing a player sending that command

#

you need the console to do it

hard crane
#

try using Bukkit.getConsoleSender() instead of player

ashen stirrup
#

if(inventaire.getName().equalsIgnoreCase("Classes)){}

worn gate
#

@vernal spruce it works, the only probleme is because this menu is only opening if u don't have the permission

#

yeah but those it work if u don't have any permissions ?

vernal spruce
#

?? this is making it more confusing

worn gate
#

i just want user that don't have any permissions to be able to get one of these permissions

ashen stirrup
#

You can check if a player has a permission with Player.hasPermission(String permission)?

vernal spruce
#

also wait,it works?

hard crane
#

hes executing the dispatchCommand from a player

vernal spruce
#

you mean you gave a player permission to luckperms?

worn gate
#

already done, the only problem is adding the permission

hard crane
#

thats why it only works if youre opped

worn gate
#

that is it

vernal spruce
#

if a player is op

ashen stirrup
#

Oh yeah

vernal spruce
#

all .hasPermission return true

ashen stirrup
#

You're making the player execute the command

#

Do this

hard crane
#

i already said replace player in dispatchCommand with Bukkit.getConsoleSender()

worn gate
#

does it work ?

ashen stirrup
#

Bukkit.dispatchCommand(Bukkit.getConsoleSender(), String command);

hard crane
#

try it

vernal spruce
#

im worried when you say "it works",that can mean a default player has acces to luckperms

worn gate
#

no

#

it doesn't

ashen stirrup
#

No, it works for OP because they have permission

worn gate
#

yeah but Bukkit.dispatchCommand(Bukkit.getConsoleSender(), String command);

ashen stirrup
#

Change player in dispatchCommand to Bukkit.getConsoleSender() so it's executed from console

worn gate
#

so like this ? Bukkit.dispatchCommand(Bukkit.getConsoleSender(), String command);

ashen stirrup
#

Replace String command with the command

vernal spruce
#

oh boy..

ashen stirrup
#

obvs

soft locust
#

how can I spawn a fake light source ?

worn gate
#

ok

ashen stirrup
#

"fake source"?

soft locust
#

light*

hard crane
#

he means light source

#

like invisible torch or smth

soft locust
#

yep ^^

ashen stirrup
#

Probably achievable with NMS?

soft locust
#

I tried this code I found on internet

Chunk chunk = ((CraftChunk)loc.getChunk()).getHandle();
        chunk.a(EnumSkyBlock.BLOCK,loc.getBlockX() & 0xF,loc.getBlockY(),loc.getBlockZ() & 0xF,15);

But the method chunk.a() cannot be resolved :/

vernal spruce
#

or messy way working with packets to hide a torch..

#

that looks like its setting the sky light level(default to 14 i think),dont think it actually creates a light source

ashen stirrup
#

That's NMS

soft locust
#

I'm not familiar with nms, all the a(), b() etc.. I don't see what they mean

vernal spruce
#

thats obfuscation..

#

instead of an actual method name theyr shrinked to a letter

soft locust
#

not very readable :/

vernal spruce
#

there should be a map somewhere for the chunk with actual methods

#

thats the point of obfuscation..

ashen stirrup
#

Use ProtocolLib

strange grove
#

does anyone know how to use permissions?

#

with holograms?

hard crane
#

what

strange grove
#

I want to make them invisible to a player that is not oped

#

how do i do this?

hard crane
#

uh i think you could cancel the packet send

vernal spruce
#

dont think its achieveable without having ur own holograms plugin

#

its still really tricky to do with catching the right packets

strange grove
#

hmm

vernal spruce
#

by tricky i mean finding out wich hologram should you stop

#

meaning you have to dig through saved holograms from another plugin..

strange grove
#

it's in a radius

vernal spruce
#

why you want to do that though?

strange grove
#

well i'm giving my images names

#

and the hologram is suppposed to show the user which name

#

is the image

#

and if they wanna replace or delete the image

#

they know which one they are doing

vernal spruce
#

are you trying to do a authetincation plugin?

strange grove
#

no

#

just trying to make a quick permission

#

so it only goes if the player is oped

hard crane
#

is the plugin yours

strange grove
#

no

#

i'm using animated frames

#

and i'm editing it for my own personal use

vernal spruce
#

are you familiar with packets?

strange grove
#

umm

#

well

#

guess not

#

but i can show you my code

#

Player player = (Player) sender; World world = (World) firstFrame.getWorld(); Location location = (Location) firstFrame.getLocation(); ArmorStand hologram = (ArmorStand) world.spawnEntity(location, EntityType.ARMOR_STAND); hologram.setVisible(false); hologram.setCustomNameVisible(true); hologram.setCustomName(ChatColor.LIGHT_PURPLE + name);

vernal spruce
#

oh boy its not even packet based holograms?

strange grove
#

...

vernal spruce
#

well try sending a changeBlock to a player wich doesnt have permission and see if it removes it

strange grove
#

is there a way I can use an if statement to mnake them invisible

frigid ember
#

Is there an api from spigot to check if a plugin got an update?

vernal spruce
#

dont think so,there is one to have ur own plugin say if there is an update..

hard crane
#

hey does anyone know what event is emitted when a player tries to fire a fake arrow (sent by a packet) projectile launch doesnt seem to work

strange grove
#

wdym a fake arrow?

vernal spruce
#

the event should only get called if an actual entity is involved(arrow),same with the most common problem trying to rightclick a npc

#

if the arrow is packet based,everything about it will be packet..

hard crane
#

the arrow is put into the inventory with a packet so that the player can shoot the bow

#

cus i want to make a bow which doesnt require arrows

tiny dagger
#

use a packet sniffer?

#

you'll find it easy

hard crane
#

what packet would i need to listen on

dull bay
#

Hello,** I have a problem when I start my server**: spigot.jar in 1.15.2. The crash text is displayed below.

tiny dagger
#

otherwise find where entityshootbowevent is called then start looking around

#

all packets

#

except chat packets

dull bay
#

Loading libraries, please wait...
java.lang.OutOfMemoryError: Java heap space
at java.util.HashMap.resize(Unknown Source)
at java.util.HashMap.putVal(Unknown Source)
at java.util.HashMap.put(Unknown Source)
at net.minecraft.server.v1_15_R1.MapGeneratorUtils.a(SourceFile:21)
at net.minecraft.server.v1_15_R1.MapGeneratorUtils.b(SourceFile:15)
at net.minecraft.server.v1_15_R1.BlockStateList.a(SourceFile:47)
at net.minecraft.server.v1_15_R1.BlockStateList$$Lambda$145/25240705.accept(Unknown Source)

hard crane
#

wait couldnt i just create my own event and fire an arrow on that

dull bay
#

at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(Unknown Source)
at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(Unknown Source)
at java.util.stream.ReferencePipeline$3$1.accept(Unknown Source)
at java.util.Spliterators$ArraySpliterator.forEachRemaining(Unknown Source)
at java.util.stream.AbstractPipeline.copyInto(Unknown Source)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source)
at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(Unknown Source)
at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(Unknown Source)
at java.util.stream.AbstractPipeline.evaluate(Unknown Source)
at java.util.stream.ReferencePipeline.forEach(Unknown Source)
at java.util.stream.ReferencePipeline$7$1.accept(Unknown Source)
at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(Unknown Source)
at java.util.stream.ReferencePipeline$3$1.accept(Unknown Source)
at java.util.Spliterators$ArraySpliterator.forEachRemaining(Unknown Source)
at java.util.stream.AbstractPipeline.copyInto(Unknown Source)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source)
at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(Unknown Source)
at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(Unknown Source)
at java.util.stream.AbstractPipeline.evaluate(Unknown Source)
at java.util.stream.ReferencePipeline.forEach(Unknown Source)
at java.util.stream.ReferencePipeline$7$1.accept(Unknown Source)
at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(Unknown Source)
at java.util.stream.ReferencePipeline$3$1.accept(Unknown Source)
at java.util.Spliterators$ArraySpliterator.forEachRemaining(Unknown Source)
at java.util.stream.AbstractPipeline.copyInto(Unknown Source)

hard crane
#

java.lang.OutOfMemoryError: Java heap space

#

you dont have enough ram

tiny dagger
#

what's that hashmap holding O_O

#

oh nvm

dull bay
#

I have sixteen go ram

tiny dagger
#

spigot is loading

#

well

dull bay
#

i allowed 4GO in java

tiny dagger
#

it only needs 1 tho java

hard crane
#

well its not enough with the stuff you want to run

dull bay
#

but i can't allowed better 4GO for Java

hard crane
#

you need to set xms and xmx flags

tiny dagger
#

^

sturdy oar
#

Is there something like a ConfigurationDeserializable ?

#

or i have to deserialize 'by hand'?

#

it seems like Bukkit has never implemented any sort of API to deserialize custom objects from a config

tiny pebble
#

Is there a way to check if a user is holding a block within their cursor?
e.g. When in an inventory, picking up a block with your mouse

dull bay
#

Unfortunately, putting values -Xmx and -Xms of 4095M my cmd told me the exact same thing. So I set an environment variable _JAVA_OTPTIONS to -Xmx4095M. And I would like to have a solution to this one.

vernal spruce
#

depends on what you want to @sturdy oar

sturdy oar
#

well i have a simple object that consists of 2 strings

#

but I have a list of them

dull bay
#

who can help me a lot?

#

Goodbye

sturdy oar
#

bye

kind crow
#

Can someone recomend cpu and ram for a server with 100 slots and no rules?

hard crane
#

depends on the plugins

kind crow
#

I have intel i7 2600k and 16gb cpu and tps drops pretty often without lag machines

#

I don't have a lot of plugins. The server is semi vanilla

vernal spruce
#

much ram = bad for java

#

you should only use what you use(bit extra)

kind crow
#

I didn't understand that. Why is it bad to have too much ram?

tiny dagger
#

i think because of garbage collector system and the spikes it would have

kind crow
#

So what do I do if the ram is full? Wouldn't it be better to have more ram so garbage collector works less?

tiny dagger
#

i'm not the person tho to ask this

#

aikar i think would have a wall of text for you on why is bad

undone narwhal
#

8-10Go is the best for Minecraft servers

#

More or less is bad

#

You can configure the garbage collector with start args

hard crane
#

not really

#

10 gigs is ok if the server is almost completely vanilla

#

also i7 2600k only allows ddr3 so id suggest upgrading that

zenith siren
#

What is easier when needing to save data?
A yaml or json file?

hard crane
#

for minecraft yaml

bronze marten
#

that comment makes no sense

#

with gson json is really easy to write

#

it just depends what you need it for

#

likely yml for configurations is easier

#

saving objects likely json

#

or refer to sth thats actually meant for saving large amounts of data, a proper db

kind crow
#

You can configure the garbage collector with start args
@undone narwhal I use some starting arguments from the top post on spigot forum, I don't think I can configure it better

#

also i7 2600k only allows ddr3 so id suggest upgrading that
@hard crane what processor would you suggest?

hard crane
#

depends what you need but definitely something newer than second gen

kind crow
#

depends what you need but definitely something newer than second gen
@hard crane would Intel Core i7-3770 be better?

hard crane
#

thats still third gen

#

newest rn is 9th

#

you dont need the newest but i would take a lower one than 6th

soft locust
#

Hi, I spawned some campfire smoke, but the particles go in every directions. How do I tell them to go upward ?

sturdy oar
#

Rolyn xd stop using Go

#

only france uses that

keen compass
#

without out tailoring the GC to handle large ram allocations, it is bad to assign a large amount of ram to the application @kind crow what ends up happening is that without the GC being tailored for this, it will take a bit longer for the GC to kick in because most of the time it waits till heap space is used up to start doing so. If that space is large, well GC has to catch up and thus can cause your application to freeze for a bit of time. Not typically wanted in a server software. Tailoring the GC isn't an easy process and requires tools to monitor the application and GC to know what needs to be altered and there is many flags to alter the GC. So, it is just best to stick with no more then about 10GB or so and using flags that are searchable to use and stick with those unless you know what you are doing 😛

strange grove
#

does anyone know how to cancel a packet?

#

i'm trying

#

to not let a player without permissions see the hologram

#

this is for animated frames

#

so I can see the images name

#

and if i want to replace it or delete it I know what image it is without making a mistake

lilac cradle
#

help me

#

my eclipse froze

#

it wont close

#

:(

#

help me

#

plz

#

i can see you typing

thick summit
#

Just downloaded CMI, but all of the commands require /cmi infront of them including basic ones such as /spawn, I have turned every single command to true in the alias file, not sure what else to do. I have proceeded to add all of the commands individually into my commands yml however just wondering if there is a better way

lilac cradle
#

???????

keen compass
#

@lilac cradle just use task manager to kill it

kind crow
#

without out tailoring the GC to handle large ram allocations, it is bad to assign a large amount of ram to the application @kind crow what ends up happening is that without the GC being tailored for this, it will take a bit longer for the GC to kick in because most of the time it waits till heap space is used up to start doing so. If that space is large, well GC has to catch up and thus can cause your application to freeze for a bit of time. Not typically wanted in a server software. Tailoring the GC isn't an easy process and requires tools to monitor the application and GC to know what needs to be altered and there is many flags to alter the GC. So, it is just best to stick with no more then about 10GB or so and using flags that are searchable to use and stick with those unless you know what you are doing 😛
@keen compass thanks for the detailed answer. Do I need to restart the server a couple of times a day or I don't need that if everything confugured corectly? But I noticed that after some time the server takes all the ram and starts to lag. After restart it's fine again. I use that start script https://aikar.co/2018/07/02/tuning-the-jvm-g1gc-garbage-collector-flags-for-minecraft/

lilac cradle
#

ok

thick summit
#

@kind crow you should set up an auto restart for your server

#

I run mine every 24 hours automatically

keen compass
#

@kind crow most people restart their server daily, but if you have decent plugins and everything set up properly you can easily let a server run for days or months at a time before restarting it. Just depends what you have going on. Non-optimal plugins tend to force you to restart your server more often especially if they have memory leaks

#

longest I have gone without restarting my server is like 3 months

sturdy oar
#

yeah I restart once a week

kind crow
#

I need to restart two times a day with my configuration

sturdy oar
#

if you NEED to restart, you have some issues

kind crow
#

otherwise I have a lot of lags

keen compass
#

as I said, most of the time it is caused from non-optimal plugins

sturdy oar
#

you SHOULD restart , but not NEED to

lilac cradle
#

it stopped thanks

kind crow
#

I could have 64gb of ram, but as that guy said its kind of bad

keen compass
#

its not that it is bad

#

it is bad if you don't tailor the GC to handle it

#

GC may be smart, but it is still dumb in a way

merry dragon
#

Is there a seed in spigot.yml that changes woodland mansion locations?

#

nevermind, i can just test and /locate it

lilac cradle
#

does eclipse have a discord

sturdy oar
#

lmao no

undone narwhal
#

Eclipse is a game it's well known

tiny dagger
#

python has a discord server

#

hell there are math discords

#

so 😂

worn gate
#
java.lang.NullPointerException: null
        at fr.gnaboo.gnanplugin.GnanPlugin.onEnable(GnanPlugin.java:31) ~[?:?]
        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:264) ~[spigot-1.12.2.jar:git-Spigot-dcd1643-e60fc34]
        at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:337) [spigot-1.12.2.jar:git-Spigot-dcd1643-e60fc34]
        at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:403) [spigot-1.12.2.jar:git-Spigot-dcd1643-e60fc34]
        at org.bukkit.craftbukkit.v1_12_R1.CraftServer.enablePlugin(CraftServer.java:381) [spigot-1.12.2.jar:git-Spigot-dcd1643-e60fc34]
        at org.bukkit.craftbukkit.v1_12_R1.CraftServer.enablePlugins(CraftServer.java:330) [spigot-1.12.2.jar:git-Spigot-dcd1643-e60fc34]
        at net.minecraft.server.v1_12_R1.MinecraftServer.t(MinecraftServer.java:422) [spigot-1.12.2.jar:git-Spigot-dcd1643-e60fc34]
        at net.minecraft.server.v1_12_R1.MinecraftServer.l(MinecraftServer.java:383) [spigot-1.12.2.jar:git-Spigot-dcd1643-e60fc34]
        at net.minecraft.server.v1_12_R1.MinecraftServer.a(MinecraftServer.java:338) [spigot-1.12.2.jar:git-Spigot-dcd1643-e60fc34]
        at net.minecraft.server.v1_12_R1.DedicatedServer.init(DedicatedServer.java:272) [spigot-1.12.2.jar:git-Spigot-dcd1643-e60fc34]
        at net.minecraft.server.v1_12_R1.MinecraftServer.run(MinecraftServer.java:545) [spigot-1.12.2.jar:git-Spigot-dcd1643-e60fc34]
        at java.lang.Thread.run(Thread.java:748) [?:1.8.0_252]```
bronze marten
#

GnanPlugin.java:31

#

java.lang.NullPointerException

#

so sth is null on line 31 of GnanPlugin

#

xd

warped compass
#

🤔

bronze marten
open mantle
#

How to make a color prefix or suffix

#

and make local chat??

distant lagoon
#

Hello i don't know if i can ask her here i would like to know how to pause my code to execute a function after without using wait () or sleep (), thanks for your help

tiny dagger
#

bukkit schelduer

floral isle
tiny dagger
#

It's green so I love it

floral isle
#

it's for my plugin

brisk fog
#

maybe some custom tress on the side of |AWG|

glacial fractal
#

I would set the left/right tilt to a value a bit less, it makes the text look distorted

#

And to add to @brisk fog, I think it would be cool to add some trees on the top of the "AWG" as well as beside

floral isle
#

ok this logo was made by a friend of mine then I ask him if he can add things to it

#

the plugin is work in progess the code are here is open source

brisk fog
#

maybe change where the crack is on the A makes it look a bit like an R

floral isle
brisk fog
#

nice

distant lagoon
#

How time works with test.runTaskLater (Main.instance, 50); for example 50 here makes 3sec

ashen stirrup
#

Just do 20*seconds

#

e.g 20*5

tiny dagger
#

the time is in ticks

#

1 tick is 1/20 of a sec

distant lagoon
#

ah thx

tiny dagger
#

also i think you can use 20 * sec

#

the compiler gets rid of the math i think 🤔

distant lagoon
#

runTaskLater(Main.instance, 20*5); yeah is good thx !

sturdy oar
#

well i have this for u

tiny dagger
#

i don't think that's needed imo

#

i mean it's just a basic conversion

torn robin
#

TimeUnit is a thing too

tiny dagger
#

guys

#

what do you think would make bungee mode/ autojoin more complete for a minigame? 🤔

#

i've come up with these atm

wheat summit
#

Hey! How would I set the visible names of players to something else?

#

For some reason using player.setDisplayName() isn't working for me

#

Tried calling it on Login and Join Events ^

torn robin
#

visible names aren't affected

#

you would have to use a library or packets

frigid ember
#

im wondering if there's a gamerule that disable a effects

broken patio
#

Anyone else having issues with .setDamage(0)??? repairs the item up to 1 durability of its max...

torn robin
#

what do you mean by a effects @frigid ember

frigid ember
#

potions effects

torn robin
#

@broken patio how are you calling it?

#

there's not a gamerule no

frigid ember
#

aww

wheat summit
#

Sorry if this would be a complicated topic though how would I use the packets?

broken patio
#
Damageable damage = (Damageable) meta;
damage.setDamage(0);
item.setItemMeta(meta);

And this is in my repair method

#

takes the item as an input

torn robin
wheat summit
#

Ok thanks a lot!

frigid ember
#

one thing more

#

so im using Multiverse Core and my effects in world 1 applied too in world 2

#

any way i can stop that?

#

pls ping if anyone could help

clever hornet
#

Whats the best free custom mobs plugin for spigot 1.8.8

remote ore
#

Hello, anybody know a good plugin for jump pad please? I test a lot of plugin for jump pad but never work 😢

broken patio
remote ore
#

@broken patio thank you I will try it 😉

broken patio
#

np!

frigid ember
#

Okay

#

I have a 1.16 server with Fabric right now

#

I want to install a rollback plugin or datapack

#

Anyone know a datapack that does that? Or how to install plugins on fabric

#

or even how to get spigot/paper/or anything 1.16

somber tinsel
#

how do I run the server with more ram

frigid ember
#

@somber tinsel What do you mean?

#

What server?

somber tinsel
#

the spigot server

#

the .jar

late wyvern
#

java -Xmx1G -jar server.jar

#

Xmx1G is the amount of MAX ram

#

so in that thing its 1GB

somber tinsel
#

i tried that and it said it couldn't find the sever file

late wyvern
#

whats your jar file called?

somber tinsel
#

spigot-1.15.2.jar

frigid ember
#

java -Xmx1G -jar spigot-1.15.2.jar

late wyvern
#

java -Xmx1G -jar spigot-1.15.2.jar

#

xdd

somber tinsel
#

thats what I did

late wyvern
#

u running on host or local hosting it?

somber tinsel
#

yes

late wyvern
#

which one?

somber tinsel
#

localhost

late wyvern
#

that should work tbh

#
        File f = new File("plugins/");
        if (!f.exists()) {
            f.mkdirs();
            Logger.info("Creating Folder Names Test");
        }

im i missing something? lmao

median swift
#

uH

#

how do I make this uh not spawing so many mobs?

frigid ember
#

turn it to peaceful 🙂

#

easy fix

meager vale
#

Place more torches xddd

#

I do not understand the issue cause : when the method opt not found the object, it create a NullPointerException at the return point for this method below.

private Object getObject(String path) {
    if (path == null || path.length() < 1)
        return this.json;
    JSONObject jpath = this.json;
    int end = -1;
    int begin;
    while ((end = path.indexOf(this.PATH_SEPARATOR, begin = end + 1)) != -1) {
        String key = path.substring(begin,end);
        JSONObject check = jpath.optJSONObject(key);
        if (check == null)
            return null;
        jpath = check;
    }
    return jpath.opt(path.substring(begin));
}```

Method `opt` is simply :

```Java
public Object opt(String key) {
    return key == null? null : this.map.get(key);
}```

My question is : have you an idea about the cause of `NullPointerEception` ??
#

Full stack :

java.lang.NullPointerException: null
    at me.N4TH4NOT.Core.config.commun.ConfigurationFile.getObject(ConfigurationFile.java:43) ~[?:?]
    at me.N4TH4NOT.Core.config.commun.ConfigurationFile.get(ConfigurationFile.java:79) ~[?:?]
    at me.N4TH4NOT.Core.config.commun.ConfigurationFile.get(ConfigurationFile.java:85) ~[?:?]
    at me.N4TH4NOT.Core.config.Settings.reload(Settings.java:53) ~[?:?]
    at me.N4TH4NOT.Core.config.Settings.<init>(Settings.java:22) ~[?:?]
    at me.N4TH4NOT.Core.Main.onEnable(Main.java:58) ~[?:?]
    ...```
bronze marten
#

You didnt initialise begin

#

if the condition in the while loop is false at first, it will never execute the body

#

Try setting it to zero or sth

wheat summit
#

I'm trying to use the ProtocolLibrary though for some methods or packets like PacketType.Play.Server.PLAYER_INFO I can't find what the different values are or how to change them

opal marsh
#

@meager vale @bronze marten looks like begin is assigned in the conditional of the while loop

bronze marten
#

Ah yes, then i guess look into jpath, maybe thats null

wheat summit
#

Ok thanks, I think I got it now

hazy haven
#

Is there a way to export a list of all commands your server has? I have more than 2900 and console cant hold that many

wheat summit
#

That's a lot

#

Hmm

#

If console can't hold that many you can do some checks and if it goes above the count of chartacters for console it can send in a new message

#

Using Protocol Lib and using the Wiki and according to the Player Info part I tried this:

        ProtocolManager protocolManager = ProtocolLibrary.getProtocolManager();
        PacketContainer packetContainer = protocolManager.createPacket(PacketType.Play.Server.PLAYER_INFO);
        packetContainer.getModifier().writeDefaults();
        packetContainer.getStrings().write(3, "Display Name").write(3, ChatColor.BLUE + "This is a tag");

Though I get the error com.comphenix.protocol.reflect.FieldAccessException: No field with type java.lang.String exists in class PacketPlayOutPlayerInfo.

opal marsh
#

I'm not completely sure but I think the error is a result of "Display Name" being nested in the packet structure

wheat summit
#

What do you mean by that?

opal marsh
#

at the root level, there's 2 varints and an object but no strings

frigid ember
#

i have this in a config:
old-attack-speed: 24
new-attack-speed: 4

#

i want the attacking to be 1.8.8

#

do i change both to 24 or both to 4 or what do i do?

wheat summit
#

Oh ok

#

So Is there a way to fix it, would I use something like getIntegers or something else?

#

Sorry I haven't used this before!

opal marsh
#

I haven't worked with protocollib much before but I suspect there might be a way to get into a tag compound

wheat summit
#

Ok thanks

wheat summit
#

That's only for tablist though right?

#

Oh I think I see, how would I get displayname from the list as a parameter though?

opal marsh
#

it returns a StructureModifier the same way other methods like getIntegers do

wheat summit
#

Sorry, what are StructureModifiers?

hoary parcel
#

the thingies that allow you to write and read packet fields

wheat summit
#

Oh ok

#

My main problem is I don't know how to get the Display Name Field from the list

#

Like I can get to the writing part to display a name though

#

Like here:

#

Display Name in the quotes is supposed to be a List though I'm not sure how to use a list to get it

StructureModifier<List<PlayerInfoData>> playerInfoData = packetContainer.getPlayerInfoDataLists();
playerInfoData.write(3, "Display Name")
hoary parcel
#

you gotta write a proper object

#

not just a string

wheat summit
#

How so?

#

Sorry for all the questions and taking a lot of time!

wheat summit
#

So make a new instance of PlayerInfoData, right?

hoary parcel
#

yes

wheat summit
#

Ok did that

#
Player player = event.getPlayer();
PlayerInfoData playerInfoData = new PlayerInfoData(WrappedGameProfile.fromPlayer(player), 0, EnumWrappers.NativeGameMode.SURVIVAL, WrappedChatComponent.fromJson(player.getDisplayName()));
quartz trench
#

Anyone here use teamcity? I'm trying to report my maven version as the build number in teamcity and this isn't working echo "##teamcity[buildNumber '${maven.project.version}']"

#

"invalid substitution" edit: found the solution it was adding this script as a build step after the maven build version=`mvn org.apache.maven.plugins:maven-help-plugin:2.1.1:evaluate -Dexpression=project.version | sed -n -e '/^\[.*\]/ !{ /^[0-9]/ { p; q } }'` echo "##teamcity[buildNumber '${version}']"

opal marsh
#

@wheat summit you probably want fromText instead of fromJson

wheat summit
#

Ok thanks

#

Trying this now though it's saying I can't cast List to PlayerInfoData:

packetContainer.getPlayerInfoDataLists().write(3, (List<PlayerInfoData>) playerInfoData).write(3, ((List<PlayerInfoData>) playerInfoData));
opal marsh
#

are you sure it's not saying it the other way around? I'm kinda poo brain rn so I could be wrong but it looks like you're trying to cast an object to a singleton list of that object

wheat summit
#

Sorry you're right

#

Playerinfo can't be casted to List

opal marsh
#

this is probably what you're looking for

#

Collections.singletonList(object) will create a list of that type with the only element being that object

wheat summit
#

Ok thanks, looks like there aren't any errors or deprecations in the IDE

#

Hmm

#

Index out of bounds and there's only 0 and 1 instead of 3

opal marsh
#

can you send the code you have and the stacktrace?

wheat summit
#

Yes

#

oh wait

#

No errors though no effect

#
    @EventHandler
    public void onGrabyPacket(PlayerJoinEvent event) throws InvocationTargetException {
        Player player = event.getPlayer();
        PlayerInfoData playerInfoData = new PlayerInfoData(WrappedGameProfile.fromPlayer(player), 0, EnumWrappers.NativeGameMode.fromBukkit(player.getGameMode()), WrappedChatComponent.fromText(player.getDisplayName() + "AAAAAA"));
        ProtocolManager protocolManager = ProtocolLibrary.getProtocolManager();
        PacketContainer packetContainer = protocolManager.createPacket(PacketType.Play.Server.PLAYER_INFO);
        packetContainer.getModifier().writeDefaults();
        packetContainer.getPlayerInfoDataLists().write(0, Collections.singletonList(playerInfoData)).write(0, Collections.singletonList(playerInfoData));

        for(Player players : plugin.getServer().getOnlinePlayers()) {
            protocolManager.sendServerPacket(players, packetContainer);
        }
    }
#

Changed the array from 3s to 0s

opal marsh
#

I don't know much of anything about that packet but you may want to create a packet listener to see if the vanilla server is also sending it and if that's overriding your packet

wheat summit
#

Ok

opal marsh
#

packetContainer.getPlayerInfoDataLists().write(0, Collections.singletonList(playerInfoData)).write(0, Collections.singletonList(playerInfoData)); looks suspicious. Is there a reason the write is repeated?

frigid ember
#

org.bukkit.craftbukkit.v1_7_R4.block.CraftBlockState cannot be cast to org.bukkit.block.Chest

wheat summit
#

In a tutorial I saw I noticed they wrote twice

#

I thought it was a bit weird though I went with it

opal marsh
#

@frigid ember can you send your code that error is from?

frigid ember
#

Chest chest = (Chest) block.getState();

opal marsh
#

@wheat summit try it with just the one write. was the tutorial for the PLAYER_INFO packet specifically?

wheat summit
#

No

#

It was for animations

opal marsh
#

@frigid ember are you absolutely certain it's a chest? try checking the type before casting. also, unless I'm mistaken, it looks like you're using a really old version

frigid ember
#

Yes, using 1.7.10 for HCF

wheat summit
#

Just one write did the same thing, it made the server run without errors though the display name of the player wasn't changed

acoustic temple
#

How does adding a potion item to an inventory work? I know how to at least make the itemstack of material.potion, but past that I'm not sure where to go

stone rampart
#

What do I need to add NMS to a maven repo?

#

What jar

#

yes I've run buildtools

#

is it spigot-api or the full spigot

opal marsh
#

full spigot

stone rampart
#

ok ty

acoustic temple
#

Thank you!

opal marsh
#

@wheat summit did you set up a listener?

#

@frigid ember was the "Yes," about being sure it's a chest or about the old version?

wheat summit
#

No all I did was make that event

opal marsh
#

try with a listener and see how many of those packets go out on join

wheat summit
#

How would I do that?

#

Just do something like

acoustic temple
#

Oh wait
I probably should've specified, what i said was confusing
I know how to add it to the inventory, I just don't know how to give the potion its effects

opal marsh
wheat summit
#
ProtocolManager manager = ProtocolLibrary.getProtocolManager();
manager.addPacketListener(new PacketAdapter(plugin, ListenerPriority.NORMAL, PacketType.Play.Client.CHAT) {
    @Override
    public void onPacketReceiving(PacketEvent event) {
        Player player = event.getPlayer();
        PacketContainer packet = event.getPacket();
        if (isMuted(player)) {
            System.out.println("[MUTED] " + player.getName() + ": " + packet.getStrings().read(0));
            event.setCancelled(true);
        }
    }
});

Found that example on the Proitocol github ^\

#

Ok

opal marsh
#

@acoustic temple you can either add custom effects or make it a base potion (one that's already in the game)

wheat summit
#

How and where would I register it, just somewhere like onEnable?

opal marsh
frigid ember
#

Does anyone know how to set the direction that an entity (like an armorstand) faces? I don't believe setPose does this. I'm looking for something like armorStand.setDirection(north/south/east/west)

#

Obviously, this does not exist

opal marsh
#

@wheat summit yes, onEnable should work

frigid ember
#

But I am looking for something like it

acoustic temple
#

And when I do that, I'd still just setItemMeta?

opal marsh
#

@frigid ember teleport the entity to the location you want with the pitch/yaw that you're looking for

#

@acoustic temple yes

acoustic temple
#

Alright, thank you so much!

frigid ember
#

@opal marsh do you have to actually teleport it? Can you not just spawn it in with the proper facing yaw/pitch?

stone rampart
#
<dependency>
            <groupId>org.spigotmc</groupId>
            <artifactId>spigot</artifactId>
            <version>1.15.2-R0.1-SNAPSHOT</version>
            <scope>system</scope>
            <systemPath>D:/Software Development/Minecraft Plugins/Spigot Builds/spigot-1.15.2.jar</systemPath>
        </dependency>``` like this ye @opal marsh ?
opal marsh
#

@frigid ember I'm not sure. When you spawn it in, are you setting the pitch/yaw of the spawn pos?

#

@stone rampart running buildtools should install it to your local repo so you don't have to reference the jar

stone rampart
#

running buildtools in my project dir?

opal marsh
#

just in general I think

stone rampart
#

rlly?

#

ok ty

opal marsh
#

give it a shot, set scope to provided and remove systemPath

#

see if it gives any errors

stone rampart
#

huh you're right

#

wow

#

it's automatically included as a dependency too?

wheat summit
#

Getting an error with something about not finding a class

stone rampart
#

provide code plz

opal marsh
#

@stone rampart like spigot-api, it's just using it to know that something exists, it doesn't need to include the code itself into your plugin

wheat summit
#

Wait a moment

stone rampart
#

ye

#

but that's wild

#

that it's automatically a dependency

#

wait nvm I didn't refresh maven xD

opal marsh
#

oh rip, did it not work?

stone rampart
#

nah it's working ty

#

but I tried removing the dependency altogether

#

and it still worked

wheat summit
#

Saying something about not finding a class

#

It should be fine though

#

Code:

    @Override
    public void onEnable() {
        instance = this;
        gDhashmaps = new GDhashmaps();
        registerEvents();
        registerCommands();
        registerTasks();
        this.getLogger().info("\n\nPlugin successfully enabled!\n\n");


        ProtocolManager manager = ProtocolLibrary.getProtocolManager();
        manager.addPacketListener(new PacketAdapter(this, ListenerPriority.NORMAL, PacketType.Play.Server.PLAYER_INFO) {
            @Override
            public void onPacketReceiving(PacketEvent event) {
                Player player = event.getPlayer();
                PacketContainer packet = event.getPacket();
                plugin.getLogger().info("\n\nPacketSent!\n\n");
                    event.setCancelled(true);
            }
        });
    }
#

Oop s sorry

opal marsh
#

can you send your full class in a paste?

wheat summit
#

Sure

opal marsh
#

also are you using the latest ProtocolLib?

wheat summit
#

yES

#

Yes*

opal marsh
#

hm, I see craftbukkit-1.8-R0.1, are you using the right protocollib version for 1.8?

wheat summit
#

I would think so

#

Here's my Gradle dependency

#

compileOnly group: "com.comphenix.protocol", name: "ProtocolLib", version: "4.5.0";

opal marsh
#

oh nice, I wasn't aware it was compatible that far back

#

and you're running the same version on the server?

wheat summit
#

Well I'm not sure if it's compatible with 1.8

near jetty
#

i need help making my strike practice plugin only give the items in a certain world instead of the main hub ?

wheat summit
#

I may have the 1.15, I did download the Jenkins build about 1 hour ago

opal marsh
wheat summit
#

Yeah looks like it

#

ProtocolLib should be in the plugins folder right?

opal marsh
#

yes

wheat summit
#

Ok

#

It is..

#

Wonder why it's doing that

#

Would I have to find a way to initialize Protocol Lib First?

#

Or add it to the plugin.yml's dependencie?

opal marsh
#

do you have it as a depend in the plugin.yml?

wheat summit
#

Dependenciues*

#

No

opal marsh
#

yeah, if it's not, it needs to be

wheat summit
#

Oh ok thanks, how would I do that?

opal marsh
#

depend: [ProtocolLib] I think

#

just a yaml list with the plugin name

naive goblet
#

ItemMeta#getDisplayName is Nullable if Material is AIR right?

#

same with getLore ?

opal marsh
#

I think it's nullable if it just doesn't have a display name or lore

near jetty
#

i need help making my strike practice plugin only give the items in a certain world instead of the main hub ?

wheat summit
#

Override onPacketSending to get notifcations of sent packets!

naive goblet
#

Techdoodle doesnt seem like it

wheat summit
#

That's the problem we have where the vanilla is being overriden right Tech?

opal marsh
#

@wheat summit I think the trouble is where it says "Override onPacketSending to get notifcations of sent packets!"