#help-archived

1 messages · Page 196 of 1

sturdy oar
#

@spring arch OMG It works OwO Thank you

#

❤️ ❤️ ❤️ ❤️ ❤️

grim halo
#

He barely understands java. You will confuse him with kotlin for sure

sturdy oar
spring arch
#
    public static void a() {
        YamlConfiguration config = YamlConfiguration.loadConfiguration(new File("blablabla.yml"));
        List<ChatFormat> formats = config.getKeys(false).stream()
                .map(config::getConfigurationSection)
                .map(section -> new ChatFormat(
                        section.getInt("priority"),
                        section.getString("permission"),
                        section.getString("format")
                ))
                .sorted(ChatFormat::compareTo)
                .collect(Collectors.toList());
        ChatFormat format = null;
        for (ChatFormat cf : formats) {
            if (p.hasPermission(cf.permission)) {
                format = cf;
                break;
            }
        }
    }

    private static class ChatFormat implements Comparable<ChatFormat> {
        final int priority;
        final String permission;
        final String format;

        private ChatFormat(int priority, String permission, String format) {
            this.priority = priority;
            this.permission = permission;
            this.format = format;
        }

        @Override
        public int compareTo(ChatFormat o) {
            return Integer.compare(o.priority, priority);
        }
    }
#

bruh code is so ugly comparing to Kotlin

bold anchor
#

Some kotlin code can also be ugly, but i agree kotlin code looks nice when done properly.

sturdy oar
#

my java code is spaghetti

#

but i like it

spring arch
#

well compare the code above with that

class ChatFormat(private val priority: Int, val permission: String, val format: String) : Comparable<ChatFormat> {
    override fun compareTo(other: ChatFormat): Int = other.priority.compareTo(priority)
}

fun main() {
    val yaml = YamlConfiguration.loadConfiguration(File("blablabla.yml"))
    val formats = yaml.getKeys(false).map { s -> yaml.getConfigurationSection(s) }.map { s ->
        ChatFormat(s.getInt("priority"), s.getString("permission"), s.getString("format"))
    }.sorted()
    val p = org.bukkit.Bukkit.getPlayer("id")
    val format = formats.find { p.hasPermission(it.permission) }
}
#

Java itself is so ugly

#

D:

sturdy oar
#

xDark do you think i should publish this poison plugin for everyone?

spring arch
#

don't know it's ur choice

#

why you ask me

sturdy oar
#

idk you helped me maybe i will put you in contributors

#

if u agree

spring arch
#

i don't mind

#

its common to just help people

#

without requiring everything

sturdy oar
#

@spring arch your spigot name is the same from discord right?

spring arch
#

i'm not registered on spigot

sturdy oar
#

bruh

#

You should so you can at least get to post pictures and videos here

spring arch
#

nah i'm fine

#

unless md_5 blocks links to imgur

#

lol

sturdy oar
#

because apparently poison type is broken lol

spring arch
#

how so

sturdy oar
#

go to #general

#

there's my JIRA issue

floral isle
#

hi everyone i am creating a mine plugin for a prison but i have a problem with a plugin event

sturdy oar
#

it doesn't make any sense to me as well, and I'm curious that nobody noticed it until now

spring arch
#

did you set correct potion effect type?

bronze acorn
#

whats up marc

spring arch
#

i don't think that's an issue with spigot

sturdy oar
#

it is

spring arch
#

can you show what potion effect type you set?

sturdy oar
#

dude read the JIRA issue lmao

spring arch
#

i did

#

you barely show 5 lines of code

bold anchor
#

Where is the jria

sturdy oar
#

because that code fails lol

spring arch
#

you have your custom potion right?

bronze acorn
#

viper im confused

#

whats the issue with that

bold anchor
#

Viper is dum probably.

sturdy oar
#

the != POISON fails

#

but it's poison

#

you can try it yourself on a plugin

bronze acorn
#

maybe because its final idk lmao

#

joking

spring arch
#

uh

#

@sturdy oar can you print the whole reference to a potion type?

#

like println(potionEffectType)

bronze acorn
#

yeah can you print both of them

#

oh

sturdy oar
#

is the class canonical name fine ?

#

I tried with that and they're different

spring arch
#

i did not see what he tried

#

just print the reference

bronze acorn
#

can you check the potioneffecttype enum

#

dont think itll help

spring arch
#

it's not enum

sturdy oar
#

It an enum

spring arch
#

what

bronze acorn
#

the type? it is..

#

wat

sturdy oar
#

PotionEffectTypw is enum

#

Isn't it

bronze acorn
#

it is ya

spring arch
#

it's an abstract class

#

wdym

bronze acorn
#

huh

undone narwhal
#

If this is Enum this is just impossible. Enum is the safest singleton stuff

sturdy oar
#

Wut

spring arch
#


public abstract class PotionEffectType
extends Object
bronze acorn
#

huh

#

how the-

sturdy oar
#

Well still the poison can be compared with ==

undone narwhal
#

Then this is static instances

spring arch
#

so print the reference for god sake

bronze acorn
#

can someone hastebin that class

undone narwhal
#

Try with . equals

bronze acorn
#

lol

spring arch
#

it does not matter

sturdy oar
#

Ok later i add more info to the JIRA

spring arch
#

as far as bukkit is not dumb and does not create new types each time

bronze acorn
#

jira idk if u did enough debugging bc ur probably gonna have to show more than that

#

such as like said above print out potioneffecttype, uh

#

lol nevermind thats it

floral isle
#

hi guys i would have a problem with a plugin event and the methods i used don't work

bronze acorn
#

but you did that

#

i mean uh

#

print out

sturdy oar
#

Sure one second tho i'm eating 😩

spring arch
#

@floral isle just ask the question

bronze acorn
#

potioneffecttype.poison.tostring

#

after ye

grim halo
#

?ask

worldly heathBOT
#

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

sturdy oar
#

@sturdy oar Why not just reverse engineer and figure our yourself?
@frigid ember I don't have time to fix spigot weirdnesses myself

spring arch
#

was md_5 drunk

static PotionEffectType     BAD_OMEN     
oof.
bronze acorn
#

huh

spring arch
#

nice documentation i guess

bronze acorn
#

i wanna see

#

can u link me it xd

sturdy oar
#

Check the sounds enum @spring arch it's full of memes

bronze acorn
#

lmao i think its bc bad omen literally makes it so raids happen in your area or smthn

spring arch
#

there is not description for it at all

bronze acorn
#

doesnt it

undone narwhal
#

As you can see there is an equals method not coming from Object, you should try it TheViperShow

sturdy oar
#

I'll try again

#

Although yesterday equals() failed as well

bronze acorn
#

print out potioneffecttype.poison.tostring

hollow thorn
#

whats the event for generating a chest

bronze acorn
#

wait no i lied its not an enum

#

oh

spring arch
#

can you print identity hashcode

sturdy oar
#

19

spring arch
#

and check if its the same for POSION and your type

#

if it's not - bukkit is dumb

bronze acorn
#

@hollow thorn you mean placing down a chest? lol

sturdy oar
#

They both have hashcode 19

undone narwhal
#

What is the hell

spring arch
#

then bukkit is dumb

#

¯_(ツ)_/¯

hollow thorn
#

erm opening a naturally generated one

sturdy oar
#

Like as much as im dumb

#

I don't think I'm that much

#

To not be able to compare a poison type

floral isle
#

in this plugin i have a holograms and in a specifed region the hologram count the broken blocks and i have implemented the Event Of TokenEnchant Plugin TEblockExplodeEvent but when i use the enchants of TE for example Explosive or Excavation the hologram don't count the blocks broken by tokenEnchant

sturdy oar
#

That's a custom event by another plugin, if it doesn't work contact the author

#

It's not a spigot event

#

Yes , although I tested on 1.15.2 with same results

floral isle
#

yes but this event are used in plugin like MineResetLite PrisonMines and JetsPrisonMines and it work

#

@sturdy oar

spring arch
#

then your code is wrong

sturdy oar
#

^

floral isle
#

i show the method i use for count the blocks

sturdy oar
#

?paste

worldly heathBOT
floral isle
#

@EventHandler public void onBreak(final TEBlockExplodeEvent e) {
final Block b = e.getBlock();
if (this.contains(b) && this.wasAlreadyBroken(b)) {
this.brokenBlocks.add(b);
this.lastSecond.add(b);
new MineUpdateEvent(this).call();
}
}

sturdy oar
#

Since when events can self call

#

Isn't that paper only

floral isle
#

@frigid ember is an Event in my plugin

sturdy oar
#

Oh

spring arch
#

I've looked hhow potion effect event is called, and everything should be ok

#

¯_(ツ)_/¯

#
    public static PotionEffect toBukkit(MobEffect effect) {
        PotionEffectType type = PotionEffectType.getById(MobEffectList.getId(effect.getMobEffect()));
        int amp = effect.getAmplifier();
        int duration = effect.getDuration();
        boolean ambient = effect.isAmbient();
        boolean particles = effect.isShowParticles();
        return new PotionEffect(type, duration, amp, ambient, particles);
    }
floral isle
#

@frigid ember No i mean a method compatible with TokenEnchant Event

#

this is another method from my code

#

@EventHandler public void onBreak(final BlockExplodeEvent e) {
final Block b = e.getBlock();
if (this.contains(b) && this.wasAlreadyBroken(b)) {
this.brokenBlocks.add(b);
this.lastSecond.add(b);
new MineUpdateEvent(this).call();
if (this instanceof HologramCompatible) {
final HologramCompatible hc = (HologramCompatible) this;
hc.updateHolograms();
}
}
}

@EventHandler public void onBreak(final EntityExplodeEvent e) {
    for (final Block b : e.blockList()) {
        if (this.contains(b) && this.wasAlreadyBroken(b)) {
            this.brokenBlocks.add(b);
            this.lastSecond.add(b);
            new MineUpdateEvent(this).call();
            if (this instanceof HologramCompatible) {
                final HologramCompatible hc = (HologramCompatible) this;
                hc.softHologramUpdate();
            }
        }
    }
}
spring arch
#

is there supposed to be ! before wasAlreadyBroken?

floral isle
#

i find this method on internet and i have adapted for my plugin

spring arch
#

lmao

#

well

#

but wait what

#

@sturdy oar

sturdy oar
#

Yes

#

What

#

Yeah I'm developing on 1.15.2 and 1.16.1 the same thing happened

#

I can't try right now

hollow thorn
#

how do i get if a chest has a loot table

safe knot
#

Does anyone know how to make a skull in an inventory in 1.12, I keep getting steve skins.. I have tried setOwner, setOwningPlayer, NMS, NBT, But none of them work...

vernal spruce
#

last time i worked with one

#

it was done thourgh reflections..

safe knot
#

it was done thourgh reflections..
Hmm, I am not that great with reflections, could you give me an example?

#

1.12

sturdy oar
#

@sturdy oar Before 1.14, you'd have to use Object#equals rather than the == operator.
@frigid ember yeah it's pretty weird

#

So it's just safer to use .equals() always ?

#

But did .equals() work for you

#

Tbh you don't always need NMS

#

Spigot has texture API

#

With SkullMeta

safe knot
#

Thanks a lot 🙂

grim halo
#

Even if you set the skin of a skull you are not guaranteed to get a texture on it. The mojang api only allows a certain amount of texture calls per minute

sturdy oar
#

Oh nvm

#

I confused with Paper API

#

They allow to set base64 texture from the API

safe knot
#

The mojang api only allows a certain amount of texture calls per minute

#

I can cache it though

grim halo
#

Thats true you can save the texture as base64 for example

simple tiger
#

u know how bungeenpcs has the mirror skin feature?

#

is it possible to do with citizens?

grim halo
#

Isnt PotionEffectType just a Enum? So internally equals is just ==

sturdy oar
#

yeah and that's dumb tho

#

they should fix it so == works

#

Like everywhere else

#

It didn't

#

I'll try again

grim halo
#

Oh nvm PotionEffectType is a class.
Means you never use ==

sturdy oar
#

Yeah but the fields should be constant

hollow thorn
#

for chests do i have to update there inventory or can i just set it in .getInventory

safe knot
#

@frigid ember Hmm it's still not really working... All of the skulls are still showing up as skulls, this is my current code:

grim halo
#

if you get the inventory and change the elements the chest is also updated. The chest just links to the inventory.

safe knot
#
    ItemStack craftItem = CraftItemStack.asCraftCopy(new ItemStack(Material.SKULL_ITEM, 1, (byte) 3));
                        SkullMeta meta = (SkullMeta) craftItem.getItemMeta();
                                meta.setLore(Arrays.asList(ChatColor.GRAY + ChatColor.STRIKETHROUGH.toString() + "--------------------", ChatColor.GOLD + "Health" + ChatColor.GRAY + ": " + ChatColor.WHITE + Math.round(Bukkit.getPlayer(pl.getName()).getHealth()), ChatColor.GOLD + "Kills" + ChatColor.GRAY + ": " + ChatColor.WHITE + p.getSesionKills() ,ChatColor.GOLD + "Kit" + ChatColor.GRAY + ": " + ChatColor.WHITE +( p.getSelectedKit()== null ? "Default" : p.getSelectedKit().getKit()), "", ChatColor.GREEN + "Click to Spectate", ChatColor.GRAY + ChatColor.STRIKETHROUGH.toString() + "--------------------"));
                                meta.setDisplayName(ChatColor.translateAlternateColorCodes('&', AssembleBoard.getChatMeta(pl.getUniqueId(), ChatMetaType.SUFFIX)) + pl.getName());
                                GameProfile profile = new GameProfile(UUID.randomUUID(), null);
                                String[] a = SkullCreator.getFromName(pl.getName());
                                profile.getProperties().put("textures", new Property("textures", a[0], a[1]));
                            
                                try {
                                    Field field;
                                
                                    field = meta.getClass().getDeclaredField("profile");
                                    field.setAccessible(true);
                                    field.set(meta, profile);
                                } catch (Exception e) {
                                    // TODO Auto-generated catch block
                                    e.printStackTrace();
                                }

                                craftItem.setItemMeta(meta);```
#

[08:44:38 INFO]: [global] XR1JOUCLHz7c6lZHhq7o2l7GmE8OZttX7GBle+P2o2Bn70j0jIpacwN2G/ja6DUzC9lee6eBL3MpE1RuianV7qGZJNXHuu7Lho7bMUEtEvZacQfEGv7QcGer3+3F+69hI01sJsr6UsIVk4TdibyK/br7l1jK6JrL5MS+/GvJjs+ybn+qBTx8hvkIyQwEMqnz9MmGeuGrkI0L5Q9J4TOU+IENLWE6tQt6sCNBDDwe6QnBvN8fmeDQE5tUZQ+VqZtwpfHvj3t7chHhHZQA0JrxGnEWJGZOebftQS/SBKMOMJcgjo+ScdHCksDZfduD4F0GuVAjiUNYl6h/oG0sxo5957rky/EK+NcJlmv6ONyq91FZtIvid55BQGqr3IY+nj7QSrPaPxi+bnoDAo7B75qt3/ukMrfaUsaXfEUHbskyR843KCyEkqnLVwiERViaJRZJGRRTWoK5A/3uySv5UpEVzIFj3k6nSPLw/cVOAFkMDnXs1OxLSTsfruK0eo/vMX0QY9kvs+5IZOrrBCbuLM2LsZ1VjijEFSOZiW3l5/lf/PgDhhU15EWWOKpOAwX6jKPvemSpeN1stEIO1iqYnyeX83dram52XZnonVcZUdGwkVqfeGQp6t4OtVgiTtwVPGoD1rsuLDmlzl7HR5djdX0eQeet9h9+8mA/bTzPzuCAzAs= [08:44:40 INFO]: [global] ewogICJ0aW1lc3RhbXAiIDogMTU5NTU5NDY1NDIxMywKICAicHJvZmlsZUlkIiA6ICJjMDg2MGU0ZWQ3OWM0YzY0YTg3NDZkNmM2M2JlZWE1NCIsCiAgInByb2ZpbGVOYW1lIiA6ICJQYXJhc2pvcnMiLAogICJzaWduYXR1cmVSZXF1aXJlZCIgOiB0cnVlLAogICJ0ZXh0dXJlcyIgOiB7CiAgICAiU0tJTiIgOiB7CiAgICAgICJ1cmwiIDogImh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvYmVmMDFiNzU1ZTE5NGRlMzMyYTY3NGM4M2RlOWNkZTA5ODg1NzFiZDA1NGFkNzg4YmQ3NTE5NzRhZTJkZGE4ZiIKICAgIH0KICB9Cn0=

#

        if(cache.containsKey(name)) return cache.get(name);
        try {
            URL url_0 = new URL("https://api.mojang.com/users/profiles/minecraft/" + name);
            InputStreamReader reader_0 = new InputStreamReader(url_0.openStream());
            String uuid = new JsonParser().parse(reader_0).getAsJsonObject().get("id").getAsString();

            URL url_1 = new URL("https://sessionserver.mojang.com/session/minecraft/profile/" + uuid + "?unsigned=false");
            InputStreamReader reader_1 = new InputStreamReader(url_1.openStream());
            JsonObject textureProperty = new JsonParser().parse(reader_1).getAsJsonObject().get("properties").getAsJsonArray().get(0).getAsJsonObject();
            String texture = textureProperty.get("value").getAsString();
            String signature = textureProperty.get("signature").getAsString();
            cache.put(name, new String[] {texture,signature});
            return new String[]{texture, signature};
        } catch (IOException e) {
            System.err.println("Could not get skin data from session servers!");
            e.printStackTrace();
            return null;
        }
#

^ The code I used to fetch it

dapper gate
#

I just use SkullMeta#setOwner and it works for me

safe knot
#

Ye, that works for me on 1.8, but certainly not on 1.12

#

Player pl = Bukkit.getPlayer(p.getName());

#

Hmm true.. but then just get it of the game profile, will that work?

dapper gate
#

Does SkullMeta#setOwningPlayer​ work?

safe knot
#

Yes
It's not working....

#

I fetched the gameprofile with this line: GameProfile profile = ((CraftPlayer)pl).getProfile();

#
    ItemStack craftItem = CraftItemStack.asCraftCopy(new ItemStack(Material.SKULL_ITEM, 1, (byte) 3));
                        SkullMeta meta = (SkullMeta) craftItem.getItemMeta();
                                meta.setLore(Arrays.asList(ChatColor.GRAY + ChatColor.STRIKETHROUGH.toString() + "--------------------", ChatColor.GOLD + "Health" + ChatColor.GRAY + ": " + ChatColor.WHITE + Math.round(Bukkit.getPlayer(pl.getName()).getHealth()), ChatColor.GOLD + "Kills" + ChatColor.GRAY + ": " + ChatColor.WHITE + p.getSesionKills() ,ChatColor.GOLD + "Kit" + ChatColor.GRAY + ": " + ChatColor.WHITE +( p.getSelectedKit()== null ? "Default" : p.getSelectedKit().getKit()), "", ChatColor.GREEN + "Click to Spectate", ChatColor.GRAY + ChatColor.STRIKETHROUGH.toString() + "--------------------"));
                                meta.setDisplayName(ChatColor.translateAlternateColorCodes('&', AssembleBoard.getChatMeta(pl.getUniqueId(), ChatMetaType.SUFFIX)) + pl.getName());
                                GameProfile profile = ((CraftPlayer)pl).getProfile();
                            
                                try {
                                    Field field;
                                
                                    field = meta.getClass().getDeclaredField("profile");
                                    field.setAccessible(true);
                                    field.set(meta, profile);
                                } catch (Exception e) {
                                    // TODO Auto-generated catch block
                                    e.printStackTrace();
                                }

                                craftItem.setItemMeta(meta);```
spring arch
#

what is this

dusky sigil
#

how do i add to a config? I want multiple strings under one category

#

Hmm

#

maybe i can use an array?

dapper gate
#
    ItemStack craftItem = CraftItemStack.asCraftCopy(new ItemStack(Material.SKULL_ITEM, 1, (byte) 3));
                        SkullMeta meta = (SkullMeta) craftItem.getItemMeta();
                                meta.setLore(Arrays.asList(ChatColor.GRAY + ChatColor.STRIKETHROUGH.toString() + "--------------------", ChatColor.GOLD + "Health" + ChatColor.GRAY + ": " + ChatColor.WHITE + Math.round(Bukkit.getPlayer(pl.getName()).getHealth()), ChatColor.GOLD + "Kills" + ChatColor.GRAY + ": " + ChatColor.WHITE + p.getSesionKills() ,ChatColor.GOLD + "Kit" + ChatColor.GRAY + ": " + ChatColor.WHITE +( p.getSelectedKit()== null ? "Default" : p.getSelectedKit().getKit()), "", ChatColor.GREEN + "Click to Spectate", ChatColor.GRAY + ChatColor.STRIKETHROUGH.toString() + "--------------------"));
                                meta.setDisplayName(ChatColor.translateAlternateColorCodes('&', AssembleBoard.getChatMeta(pl.getUniqueId(), ChatMetaType.SUFFIX)) + pl.getName());
                                GameProfile profile = ((CraftPlayer)pl).getProfile();
                            
                                try {
                                    Field field;
                                
                                    field = meta.getClass().getDeclaredField("profile");
                                    field.setAccessible(true);
                                    field.set(meta, profile);
                                } catch (Exception e) {
                                    // TODO Auto-generated catch block
                                    e.printStackTrace();
                                }

                                craftItem.setItemMeta(meta);```

@safe knot Change meta.getClass().getDeclaredField to SkullMeta.class.getDeclaredField

#

how do i add to a config? I want multiple strings under one category
@dusky sigil You can use a list

dusky sigil
#

I tried that

safe knot
#

Change meta.getClass().getDeclaredField to SkullMeta.class.getDeclaredField

#

Okay

dusky sigil
#

but i have a feeling im doing it wrong

#

also im getting a null

dapper gate
#

also im getting a null
@dusky sigil Is there any errors?

dusky sigil
#

well

#

yeah

#

im getting a null

#
List<String> FactionNames;
FactionNames.add(args[1]);
                this.getConfig().set("faction.list", FactionNames);
                saveConfig();
                try {
                    cfg.save(file);
                } catch (IOException e) {
                    // TODO Auto-generated catch block
                    e.printStackTrace();
                    
                }```
#

trying to do it this way

#

ignore there being no methods

#

im defining everything afterwards

#

well not afterwards

safe knot
#

I tested that and it should be working unless your server isn't configurated correctly or you're being rate limited by Mojang's API.

I can't be rate limited as I tested that and cached it with each new name. All skins are showing properly (apart from GUI's) and BungeeCord and ip-forwarding is enabled.

dusky sigil
#

but you get the idea

frigid ember
#

ILikeToCode?

dusky sigil
#

because cfg generates a config

frigid ember
#

do you know how to control mobs using protocollib?

dusky sigil
#

I have a separate config.yml

#

that is in no way linked to this one

#

oh i need to do new arraylist?

safe knot
#

@dapper gate I am getting NoSuchFieldException: profile

dapper gate
#

@dapper gate I am getting NoSuchFieldException: profile
@safe knot try CraftMetaSkull.class

dusky sigil
#

@frigid ember thanks

safe knot
#

try CraftMetaSkull.class

#

Okay

#

@dapper gate CraftSkull exists, but CraftMetaSkull doesn't..

spring arch
#

What

#

it will make the difference

#

code will no longer work lol

safe knot
#

So... What should I do then?

bold anchor
#

ILikeToCode

#

lol

#

Oh wait it wasn't you that told him to use skullmeta

spring arch
#

yes i'm okay lol

#

why the hell are you so toxic?

graceful vigil
#

he isn't even being toxic lmao

spring arch
#

as you say

safe knot
#

I used SkullMeta myself to try setOwningPlayer and setOwner, but those both didn't work

spring arch
#

why SkullMeta.class and meta.getClass() are the same things

#

lol

safe knot
#

And I am on 1.12 so CraftSkullMeta doesn't exist

spring arch
#

because it's CraftMetaSkull

bold anchor
#

CraftMetaSkull is the implementation of the interface.

#

CraftMetaSkull is the one with the fields and shit.

#

CraftMetaSkull is the one that holds the profile

#

CraftMetaSkull is the one you need to use.

bold anchor
#

Lol

#

sec let me actually check

spring arch
#

It's probably package private

#

¯_(ツ)_/¯

bold anchor
#

I'm too lazy to check, just do it properly.

safe knot
#

What you've been told to do isn't necessary

#

So what should I do then..

spring arch
#

use Paper which exposes the API you need

#

lul

safe knot
#

use Paper which exposes the API you need
I use tacospigot, it's a fork of Paper

safe knot
#

PlayerProfile exists and I have tried it, but didn't work either

spring arch
#

It exists

#

I'm using 1.12

#

dude stop talking things you don't know

#

what the fuck

bold anchor
#

I would like, ehm update.

spring arch
#

no?

bold anchor
#

Also it is a fair response.

spring arch
#

and what's next?

bold anchor
#

Why not?

spring arch
#

it's a fork

bold anchor
#

Just go to latest version, stop staying on outdated shit versions.

spring arch
#

fork which is better than original, yeah

#

you are totally right dude

#

1.12.2 paper

    public void setPlayerProfile(@Nullable PlayerProfile profile) {
        this.profile = profile == null ? null : CraftPlayerProfile.asAuthlibCopy(profile);
    }
dapper gate
#

@dapper gate That would literally make no difference since CraftMetaSkull implements SkullMeta. They'd both return the same class.
https://imgur.com/a/OR11cZ4 lul

spring arch
#

tons of people sit on versions 1.12.2 because 1.13+ sucks in terms of performance

#

and only Paper fixes these issues

dapper gate
#

no you are

#

just showing you that you can't get fields that doens't exist in a interface class

spring arch
#

well you said it will return the same

#

^

dapper gate
#

thats just how reflection works

graceful vigil
#

this channel is a shit show

spring arch
#

yeah because there are tons of people who are trying to advice something, but they don't know if it's gonna help or not

#

¯_(ツ)_/¯

#

dude

#

meta.getClass() will return CraftMetaSkull

#

not SkullMeta

#

that's not how it works

#

SkullMeta is an interface and something needs to IMPLEMENT IT

#

for fuck sake

#

it's like you started learning bukkit before learning the language itself

#

what's wrong with people

safe knot
#

Okay, but the question stays and why we started this whole conversation, how to do it properly?

spring arch
#

what are you trying to do?

#

dude stop

#

stop

safe knot
#

what are you trying to do?
Use skulls in a GUI of existing players

spring arch
#

yes and what's the problem

safe knot
#

None of the methods I have tried, have rendered the skin at all

#

setPlayerProfile included

bold anchor
#

@frigid ember CraftSkulleMeta.getClass will not return the interface it is implementing.

spring arch
#

can you show your current code.

#

without junk that people told you to write

safe knot
#
            ItemStack craftItem = CraftItemStack.asCraftCopy(new ItemStack(Material.SKULL_ITEM, 1, (byte) 3));
                    
                                try {
//                                    Field field;
                                        SkullMeta meta = (SkullMeta) craftItem.getItemMeta();
                                        meta.setLore(Arrays.asList(ChatColor.GRAY + ChatColor.STRIKETHROUGH.toString() + "--------------------", ChatColor.GOLD + "Health" + ChatColor.GRAY + ": " + ChatColor.WHITE + Math.round(Bukkit.getPlayer(pl.getName()).getHealth()), ChatColor.GOLD + "Kills" + ChatColor.GRAY + ": " + ChatColor.WHITE + p.getSesionKills() ,ChatColor.GOLD + "Kit" + ChatColor.GRAY + ": " + ChatColor.WHITE +( p.getSelectedKit()== null ? "Default" : p.getSelectedKit().getKit()), "", ChatColor.GREEN + "Click to Spectate", ChatColor.GRAY + ChatColor.STRIKETHROUGH.toString() + "--------------------"));
                                        meta.setDisplayName(ChatColor.translateAlternateColorCodes('&', AssembleBoard.getChatMeta(pl.getUniqueId(), ChatMetaType.SUFFIX)) + pl.getName());
                                        PlayerProfile profile = ((CraftPlayer)pl).getPlayerProfile();
                                        meta.setPlayerProfile(profile);
                                        craftItem.setItemMeta(meta);
//                                    field = meta.getClass().getDeclaredField("profile");
//                                    field.setAccessible(true);
//                                    field.set(meta, profile);
                                } catch (Exception e) {
                                    // TODO Auto-generated catch block
                                    e.printStackTrace();
                                }```
bold anchor
#

Yes thats the interface, whats so special about it?

spring arch
#

firstly

#

you don't need to cast to CraftPlayer

#

secondly, are you running behind bungeecord?

bold anchor
#

Oh, i thought you were saying to use the interface.

safe knot
#

secondly, are you running behind bungeecord?
Ye

spring arch
#

are you using paper?

bold anchor
#

It does make a difference since interface does not have fields btw.

spring arch
#

did you enable bungeecord mode in paper.yml?

frigid ember
#

this ofc doesnt work

bold anchor
#

Atleast that one doesn't.

frigid ember
#

but how would I set a player into a boat

#

with entity instead of entitytype

safe knot
#

did you enable bungeecord mode in paper.yml?
What does that exist?!

spring arch
#

Yes

safe knot
#

bungee-online-mode: true
This you mean?

bold anchor
#

You shouldn't stay here on spigot then, a lot of users are like this.

spring arch
#

yep

#

can you show properties of a PlayerProfile?

#

like print it or something

safe knot
#

Sure

graceful vigil
#

everyone on spigot thinks they're the best developer ever

spring arch
#

dude this is help channel

#

if you want to talk about life

#

go to a different place

grim halo
#

I am. In fact the best developer ever.

spring arch
#

i don't mind lol

#

i don't really care what people say about me on the internet

#

can't say the same about you tho

bold anchor
#

The meta.getClass is the correct thing to do

dusky sigil
#

alright so im printing a ArrayList and it works great but the problem is there its all surrounded by [name, name2] and i dont want that

devout crest
#

Should I make a plugin and upload it to Spigot, how do you license them?

bold anchor
#

Like usual.

agile gyro
#

Hi

#

I was just installing spigot

devout crest
#

Wdym @bold anchor?

agile gyro
#

And this message came up

#

Initializing Legacy Material Support. Unless you have legacy plugins and/or data this is a bug!

spring arch
#

@dusky sigil String.join(", ", list)

agile gyro
#

Is it because I am running bungeecord?

devout crest
#

You have plugins that use legacy materials...

#

You can ignore it

dusky sigil
#

@spring arch much appriciated

agile gyro
#

All of my plugins are new

agile gyro
#

All my plugins are new

devout crest
#

Yes but they use legacy materials

agile gyro
#

Thats why i posted my message

devout crest
#

It's fine

agile gyro
#

Ok

devout crest
#

Doesn't matter how new they are it shows up anyway with some

spring arch
#

@safe knot can u show in game?

bold anchor
#

One of them didn't specify api-version in their plugin.yml

devout crest
#

Because of how they are programmed

safe knot
#

Ehh you mean Broadcast or ..?

devout crest
#

@bold anchor wdym "like normal"?

spring arch
#

nah just the skull in game

bold anchor
#

Like how you would license anything?

safe knot
#

Where it's working properly or isn't?

devout crest
#

Okay

spring arch
#

yes

frigid ember
#

in an event I want to make a player passenger of a boat

#

BOAT.setPassenger(player);

spring arch
#

vehicle.addPassenger(player)

frigid ember
#

but what will vehicle point to

agile gyro
#

Can't keep up! Is the server overloaded? Running 6405ms or 128 ticks behind

safe knot
frigid ember
#

And minecarts, etc are also vehicles

devout crest
#

@agile gyro you got a lag machine or some shit?

agile gyro
#

This usually happens right?

spring arch
#

@safe knot alright can u uh print it's NBT?

devout crest
#

No

agile gyro
#

No, I just started the server

safe knot
#

alright can u uh print it's NBT

#

Sure

frigid ember
#

xDark, minecarts are also vehicles

devout crest
#

How much memory?

agile gyro
#

1 gb for each bungeecord server

spring arch
#

vehicle instanceof Boat?

devout crest
#

Huh each Bungeecord???

frigid ember
#
            Boat boat;
            boat.setPassenger(pl);```
#

?

devout crest
#

You mean each server?

agile gyro
#

The spigot servers running under bungeecord

grim halo
#

1Gb for a minecraft server is not enought.

devout crest
#

Yeah IDC about bungee how much ram do they have

spring arch
#

if (vehicle instanceof Boat) vehicle.setPassenger(player)

agile gyro
#

1gb

devout crest
#

And yeah you need at least 4 for spigot on 1.14+

agile gyro
#

oh ok

frigid ember
#

just 'vehicle'

agile gyro
#

Its fine now

#

19/20 tps

grim halo
#

the bungee server can run on a gb but if you got 1.12+ server you should opt at 3-4 gb min

frigid ember
#

Vehicle vehicle = x?

#

PlayerInteractEntityEvent

devout crest
#

@agile gyro I have 5GB for a 1.15.2 server with like 50 plugins

#

It runs fine

safe knot
#

@spring arch [09:41:21 INFO]: [global] {SkullOwner:{Id:"327e74e5-e88f-435f-8236-7aa19376525e",Properties:{textures:[{Signature:"YWRsysijscldGTw7IhquUfW8yDb/q3wlkIeY6TjfkGR8cQy7H//xpJ8zC7tx/Gs8v7wKeZSACaxUPzye8D/jbNe23bjWJYvTXV0rtgFgak2pnRRlQ79Qe43cSEyCAfccmN/ZFAjfq+UoNr2Y7nQ4+bDxsHHVbRPqwUVHwfcuLh+p7t1ZdxwwDqTnUPrmDKCus+iLhfsJ//SSKiqZ1+42e5CvgeRTXOzkI6zgdbPvyo+Cmb6Iu7ZgFguNYxSu0AzosVBMlRhpc8p9ABg4n3aEEpaQko6cin4rwl4RTycPwXiEB/EAFuwwxMk/SjC+koNaKIfeQ0E6Erl/efaCxsVYjanN0LFkb03cRRCHJXFbvAi0Sma3/C+Wp64FMZ0J/3bvTGNmRbQWkuaCZ6Lf4C8sCkOTXPdch3nCHl69vuoTqI7eJbVFeJN3tcRhs/QmDjE/9DgxKkucxCBUSgpVipEI8NdvFOVLvkI03fsTlPWGG1T5OAzJjkg3kyR5zALX2uyDtMrtWeS/L77kGmOoLtybkkhQb3rQEtI9s0Z0ZpRhzd23EcHlflwKRh8OeweUaTkDOclC7IPdZp4hL4P0XNUmaTHunIRydfmcN+UPS294GTJmQ8cYur1sSY94nOgRc1cQz+LSB1mPU5A3TxAJ9li76/sP9SM0lNX8eavRDY7+RzY=",Value:"ewogICJ0aW1lc3RhbXAiIDogMTU5NTU5MzU4MjQyOSwKICAicHJvZmlsZUlkIiA6ICIzMjdlNzRlNWU4OGY0MzVmODIzNjdhYTE5Mzc2NTI1ZSIsCiAgInByb2ZpbGVOYW1lIiA6ICJGbGVyYWtsIiwKICAic2lnbmF0dXJlUmVxdWlyZWQiIDogdHJ1ZSwKICAidGV4dHVyZXMiIDogewogICAgIlNLSU4iIDogewogICAgICAidXJsIiA6ICJodHRwOi8vdGV4dHVyZXMubWluZWNyYWZ0Lm5ldC90ZXh0dXJlLzZmMTAwMjE3YTUzMzEwMjZkZTk2NjFjNjM2MmVjOTEyNmExNTExMWE2ZGJlZmQ5OGU2ODU2OWJiZGI5ZGI4OTIiCiAgICB9CiAgfQp9"}]},Name:"Flerakl"},display:{Lore:["--------------------","Health: 20","Kills: 0","Kit: Default","","Click to Spectate","--------------------"],Name:"Flerakl"}}

spring arch
#

@safe knot if you are still looking
CraftItemStack.asNMSCopy().save(NBTTagCompound()).toString()

frigid ember
#

ikr

#

but

safe knot
#

CraftItemStack.asNMSCopy().save(NBTTagCompound()).toString()
Yea I used that

frigid ember
#
    @EventHandler
    public void onPlayerMobInteract(PlayerInteractEntityEvent e) {
        if (e.getRightClicked() instanceof Horse) {
            Player pl = e.getPlayer();
            Entity ent = e.getRightClicked();
            Vehicle vehicle = (Vehicle) e.getRightClicked();
            ent.setPassenger(pl);
            if (vehicle instanceof Boat) {
                vehicle.setPassenger(pl);
            }
        }
    }```
#

look

#

if a player clicks a horse

#

he needs to be spawned into a horse&&boat

#

sounds weird

#

ikr

spring arch
#

@safe knot are there any errors in client's log

#

not the server

safe knot
#

I'll have a look

#

Nope

spring arch
#

gonna test it myself lol

#

gladly it takes for me 5 seconds

#

¯_(ツ)_/¯

safe knot
#

Ye, I used labymod which didn't used logs, so had to use forge

spring arch
#

Works fine for me.

#
      ItemStack craftItem = new org.bukkit.inventory.ItemStack(Material.SKULL_ITEM, 1, (byte) 3);

      try {
//                                    Field field;
         SkullMeta meta = (SkullMeta) craftItem.getItemMeta();
         meta.setPlayerProfile(entityplayer.getBukkitEntity().getPlayerProfile());
         craftItem.setItemMeta(meta);
      } catch (Exception e) {
         // TODO Auto-generated catch block
         e.printStackTrace();
      }
      entityplayer.getBukkitEntity().getInventory().addItem(craftItem);
safe knot
#

No not the player inventory but an other inv

spring arch
#

ok will do

#

works fine.

safe knot
#

Hmm

spring arch
#
         server.postToMainThread(() -> {
            ItemStack craftItem = CraftItemStack.asCraftCopy(new org.bukkit.inventory.ItemStack(Material.SKULL_ITEM, 1, (byte) 3));
            SkullMeta meta = (SkullMeta) craftItem.getItemMeta();
            meta.setPlayerProfile(p.getPlayerProfile());
            craftItem.setItemMeta(meta);
            Inventory inv = p.getServer().createInventory(null, 9);
            inv.addItem(craftItem);
            p.openInventory(inv);
         });
safe knot
#

And try to add a lore and a different displayname..

spring arch
#

🤔

safe knot
#

And are you using bungeecord or ..?

tiny dagger
#

is that paper? 😂

spring arch
#

paper rocks.

safe knot
#

OMG, xDark I found the issue.

tiny dagger
#

i doubt spigot has any of the gameprofile instances public

safe knot
#

Thanks for helping.

balmy sentinel
#

why does everyone come here with paper issues don't they have their own discord?

safe knot
#

Welp, the way the GUI worked is that it saved only the enchantments, durability,displayname,lores and amount and not the other data...

spring arch
#

It's not a paper issue.

tiny dagger
#

paper doesn't rock

spring arch
#

It does :)

tiny dagger
#

scizor

spring arch
#

Async lightning engine? Paper.
Better performance? Paper
More stuff exposed to the API? Paper
More contributors? Paper

balmy sentinel
#

terrible looking forums

spring arch
#

i'm not encouraging anyone

#

it's peoples own choice on what to use

#

how did you setup your workspace

#

you were supposed to open maven project

#

you don't have to

#

Spigot-API is just an open API, Spigot-Server includes a work with internal's server stuff

#

yep

#

no it depends on what you are doing

#

so for example

#

you're adding a method to Player class

#

Player is an interface and it has an implementation, so you will need to also do changes in Spigot-Server

#

if you only touch API that is not depend on Spigot-Server, you are fine

#

yeah he did exactly what i said

winter hawk
#

can anybody help me

#

my entire server shutdown

worldly heathBOT
spring arch
#

your usercache.json is probably corrupted if I saw correctly

#

just delete it

winter hawk
#

[10:09:31] [main/INFO]: Environment: authHost='https://authserver.mojang.com', accountsHost='https://api.mojang.com', sessionHost='https://sessionserver.mojang.com', name='PROD'
[10:09:32] [main/INFO]: Reloading ResourceManager: Default, bukkit
[10:09:32] [Worker-Main-4/INFO]: Loaded 7 recipes
[10:09:34] [Server thread/INFO]: Starting minecraft server version 1.16.1
[10:09:34] [Server thread/INFO]: Loading properties
[10:09:34] [Server thread/INFO]: This server is running CraftBukkit version git-Spigot-beb7d47-145921e (MC: 1.16.1) (Implementing API version 1.16.1-R0.1-SNAPSHOT)
[10:09:34] [Server thread/ERROR]: Encountered an unexpected exception
java.lang.NullPointerException: null
at net.minecraft.server.v1_16_R1.JsonList.load(JsonList.java:164) ~[server.jar:git-Spigot-beb7d47-145921e]
at net.minecraft.server.v1_16_R1.DedicatedPlayerList.y(SourceFile:95) ~[server.jar:git-Spigot-beb7d47-145921e]
at net.minecraft.server.v1_16_R1.DedicatedPlayerList.<init>(SourceFile:22) ~[server.jar:git-Spigot-beb7d47-145921e]
at net.minecraft.server.v1_16_R1.DedicatedServer.init(DedicatedServer.java:147) ~[server.jar:git-Spigot-beb7d47-145921e]
at net.minecraft.server.v1_16_R1.MinecraftServer.v(MinecraftServer.java:810) ~[server.jar:git-Spigot-beb7d47-145921e]
at net.minecraft.server.v1_16_R1.MinecraftServer.lambda$0(MinecraftServer.java:164) ~[server.jar:git-Spigot-beb7d47-145921e]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_242]
[10:09:34] [Server thread/ERROR]: This crash report has been saved to: /home/container/./crash-reports/crash-2020-07-24_10.09.34-server.txt
[10:09:34] [Server thread/INFO]: Stopping server
[10:09:34] [Server thread/INFO]: Saving worlds

#

that is my latest.log file

bold anchor
#

You banlist json is corrupt

#

Your*

winter hawk
#

how do I fix that

spring arch
#

delete bans file or repair it manually

winter hawk
#

so delete banned-players.json or banned-ips.json

bold anchor
#

Either

winter hawk
#

okay

#

I will try to turn the server back on

#

got it. Thx a lot

cedar harbor
#

Hey, I have an issue running spigot on Ubuntu server 20.04 with openjdk version 11.0.8. When using the "stop" command to close the server, it freezes for a long time (10/15 ish seconds) on: [14:20:27] [Server thread/INFO]: Saving chunks for level 'ServerLevel[world]'/minecraft:overworld before it goes through to either finish the save, or crash with this error: https://pastebin.com/7qMDyWx6

#

I have found no relating circumstances to when it goes through without error and when it doesn't.

spring arch
#

your fs responds too slow

cedar harbor
#

fs?

spring arch
#

file system

cedar harbor
#

hmm okay, yea that'd make sense

spring arch
#

It waits for world save to complete, but save itself is stuck on java.base@11.0.8/sun.nio.ch.FileDispatcherImpl.pwrite0(Native Method)

woven raft
#

i have a prison server and i want to reset, how would i reset the inventories and locations of players?

cedar harbor
#

ah I see

#

how's that possible though? it's a newly generated world, and my pc has run multiple servers before

spring arch
#

check if your disk is ok

#

with tools like

#

crystaldiskinfo

grim halo
#

@woven raft Just delete the player files

woven raft
#

where are those located?

spring arch
#

in the world directory

grim halo
#

inside your main world folder

spring arch
#

rd /s /q playerdata for win
rm -rf playerdata for unix

woven raft
#

i deleted all the playerdata but it didnt work

cedar harbor
#

Alright, I'll try that out, thanks a lot @spring arch. Been pulling my hair out for quite a bit now.

grim halo
#

stop server -> delete files -> start server

woven raft
#

nvm i deleted from the wrong world folder

agile gyro
#

Hi

#

I complied a spigot jar using bulidtools

#

And I tried starting my server

#

After a few min

#

This happened

grim halo
#

What happened?

agile gyro
#

Well this is akward

#

Its not letting me post it

balmy sentinel
#

?paste

worldly heathBOT
agile gyro
#

Because it is above the character limit

#

Ok

spring arch
#

don't upload it lol

#

your log does not show anything

agile gyro
#

You cannot upload a file to this chat

spring arch
#

paste full error

agile gyro
#

It shows the error

spring arch
#

no

#

only part of it

sinful spire
#

dont upload the jar

agile gyro
#

Ok

#

I'll paste the whole log

balmy sentinel
#

post it in the hastebin tho

high wadi
sinful spire
#

whats SSSpigot

high wadi
#

Fork

agile gyro
#

Thats the whole log

grim halo
#

Then go on the SSSpigot discord lul

sturdy oar
#

smh is it another shitmarket fork

high wadi
#

Yes I know. He is not online, I decided to ask here.

grim halo
#

Dude dont upload the jar.

sturdy oar
#

"improves tps" , "added many features"

#

25$

sinful spire
#

25$ ew

sturdy oar
#

no it's just a meme i don't even know what that is, just gave a random price

#

we do not support any kind of illegally redistributed software here

sinful spire
#

its 18$

agile gyro
#

Can someone help

high wadi
#

Are you laughing? And it really boosts TPS a lot. 😀

agile gyro
#

Spigot 1.16.1 is crashing

sturdy oar
#

Are you laughing? And it really boosts TPS a lot. 😀
@high wadi sure

grim halo
#

@agile gyro Your server runs with 1024mb memory. Thats why it crashes

agile gyro
#

Oh really?

sturdy oar
#

probably

agile gyro
#

So I need more ram on the server?

high wadi
#

@high wadi You're also leaking your players IP addresses.
@frigid ember What's the big deal?

sinful spire
#

nothing, yeah

grim halo
#

As i told you before. 1gb is not enought to run a minecraft server. Get at least 3 gb

bronze acorn
#

oh no ips scary 😪

grim halo
#

2 is fine if you dont use plugins

agile gyro
#

Ok, thanks

sturdy oar
#

@agile gyro uninstall a plugin

#

BungeeChatAPI

high wadi
#

😆

agile gyro
#

I have to get a new server then

bronze acorn
#

me home hosting at 1gb spawning npcs on 1.16

#

hehe

agile gyro
#

My server only has 4 gb of ram shared across 6 servers

sturdy oar
#

don't use it

sinful spire
#

be aware i can ddos you with my 0.01kb internet lmao

agile gyro
#

Bungeecord said it won't run without it

bronze acorn
#

😯

high wadi
grim halo
#

TheUnreal then only run one single server. You cant even run 2 servers on that machine.

bronze acorn
#

unreal u have a plugin that needs it

#

that plugin prolly dumb

sturdy oar
#

any kangarko plugin is

#

but if you need it and it works, i guess keep it

#

i'm not blocking you

agile gyro
#

I was running multiverse instead of bungeecord before

bronze acorn
#

huh

agile gyro
#

Thats how I got many world

bronze acorn
#

say what now

grim halo
#

If you have 4 gb of ram you should just throw bungeecord in the trash and run on single server and handle everything per world

bronze acorn
#

oh i got it nevermind

sinful spire
#

https://www.spigotmc.org/resources/bungeechatapi.38379/
this plugin is bad , not open-source, and doesn't even support your version
I guess its open source 😄

agile gyro
#

But I needed a plugin to work on one world and not in the other

bronze acorn
#

get per world plugins

agile gyro
#

Thats for bukkit, not for spigot right?

#

Or am I an idiot?

bronze acorn
#

pretty sure spigot is a heavily modified fork of it

#

and it has a spigot version

sturdy oar
#

I guess its open source 😄
@sinful spire Yes but there are better alternatives tbh. Also it says 1.16.1 is not supported? Very confusing and misleading resource page

bronze acorn
#

im pretty sure

#

uh its not open source

#

thats a link to bungeecord

#

lol

agile gyro
#

I'll probably get a upgraded server

#

Thanks for your help though

sturdy oar
#

1.16.1 is very laggy and resource demanding

#

you'll need powerful servers

#

if you need lot of players

bronze acorn
#

u probably just have a bad cpu i can run a mc server on 1gb fine but havent tried with a lot like viper says

#

1gb can support like 10 players w like 5 plugins probably

#

lol

#

depending on how intensive the plugin is

#

yeah anti cheats use packets im pretty sure

#

which isnt really helping you

sturdy oar
#

depends on how bad is the anticheat done

bronze acorn
#

if you're using 1 gif lol

#

gig

sturdy oar
#

having an anticheat doesn't always mean you're adding intense load to the server

bronze acorn
#

it adds to it though

#

kind of

agile gyro
#

But, it's werid

sturdy oar
#

Spartan 🤣

bronze acorn
#

not a lot but it still adds to the issue sometimes

agile gyro
#

my 3 1.8 servers are fine

#

Its just the 1.16.1 servers

sturdy oar
#

1.8.8 is not 1.16.1

river cradle
#

Hi there, is there a way for me to set the Player#hasPlayedBefore() to false? I would need this to debug an issue which occurs only with players joining for the first time. Removing the player from the usercache.json did not work.

bronze acorn
#

remove playerdata

#

from the world

#

i thought 1.16 was actually optimized 👁️👄👁

agile gyro
#

Removing playerdata would remove all players inventories

bronze acorn
#

it would remove the playerdata of a single player if you were to delete the json that starts with their uuid

high wadi
#

Remove server

bronze acorn
#

and yeah... thats the point of never playing before..

grim halo
#

re install linux or get a new server

#

then check new players there

river cradle
#

it would remove the playerdata of a single player if you were to delete the json that starts with their uuid
@bronze acorn The problem is, I have multiple worlds... Would removing them from each world's playerdata work?

olive dagger
#

You should create your own config to manager if player has played before

grim halo
#

You only need to delete it from the main worlds directory

river cradle
#

Thank you!

wheat summit
#

Hello! I want to spawn NPCs with skins and I was able to do it with NMS though lots of people suggest that it's unstable and I should use something else, I've tried looking around for tutorials on spawning entities with skins without using NMS though haven't found any, would anyone know a solution for it?

#

Oh ok

spring arch
#

Citizens, but it's kinda a mess

wheat summit
#

Ok

sturdy oar
#

Hello! I want to spawn NPCs with skins and I was able to do it with NMS though lots of people suggest that it's unstable and I should use something else, I've tried looking around for tutorials on spawning entities with skins without using NMS though haven't found any, would anyone know a solution for it?
@wheat summit yes

#

ProtocolLib

#

is technically not NMS

grim halo
#

If you can spawn your own npcs dont use citizens. Its awfull.

wheat summit
#

Ok

bronze acorn
#

remember if you make an nms entity you cant use actual events such as playerinteractentityevent

wheat summit
bronze acorn
#

you have to listen for packets

spring arch
#

your can if you do it right

wheat summit
#

To get a NMS class ^]

bronze acorn
#

protocollib has a packetlistener which is easy

wheat summit
#

Last time I did also make an NMS entity it was quite easy to interact with ^

bronze acorn
#

yeah protocollib is legendary

spring arch
#

you can do the same thing with players

bronze acorn
#

yeah

spring arch
#

but there are some rocks you would have to deal with

bronze acorn
#

packettype.play.client.entity_use i think??

wheat summit
#

Ok thanks, a problem I also have with NMS is it only seems to be usable with Spigot and I'm running a Multi-Server network

bronze acorn
#

i have an event that gets called like a tick after that packetlistener triggers

wheat summit
#

Seems to not be usable with Spigot

#

My bad ^

bronze acorn
#

wdym only usable with spigot

#

wat

wheat summit
#

I just forgot to say that it doesn't seem to work with Spigot

bronze acorn
#

make sure your server jar is tacospigot

#

no ilike actually its not stressful at all

#

surprisingly

#

and did you conpile with tacospigot

#

man you got javadocs memorized 👀

#

use the same jar youre using for your server

#

dont use taco for your server and paper for your plugin

#

oh damn ilike

#

xd

#

use the same spigot dependency

#

as your server

#

👁👄👁

grim halo
#

doc basically: Why cant i put a stone into a household mixer if i can put it in a concrete mixer

wheat summit
#

Would anyone know how to get NMS to work with Spigot then? Everytime I've tried it, Spigot seems to crash for some reason, would I have to switch to CraftBukkit?

bronze acorn
#

because concrete is plastic ez

#

you're using packets incorrectly i believe

wheat summit
#

Really? Oh

bronze acorn
wheat summit
#

It was from a while ago

bronze acorn
#

oh that page took 10 years to load lol

wheat summit
#

Though if I added the CraftBukkit dependency, the code would only work on CraftBukkit and not Spigot, isn't CraftBukkit in Spigot?

bronze acorn
#

dont use craftbukkit

#

compile spigot with maven

#

with buildtools

#

i-

wheat summit
#

Spigot is much more stable

bronze acorn
#

👁👄👁

spring arch
#
      EntityPlayer fake = new EntityPlayer(MinecraftServer.getServer(), world, profile, new PlayerInteractManager(world));
      NetworkManager networkManager = new NetworkManager(EnumProtocolDirection.SERVERBOUND);
      fake.playerConnection = new PlayerConnection(MinecraftServer.getServer(), networkManager, fake);
      world.addEnity(fake);
wheat summit
#

Though what do you mean? I have ran build tools

spring arch
#

¯_(ツ)_/¯

wheat summit
#

Yeah

bronze acorn
#

instead of adding spigot-api

#

as your dependency

#

add spigot

wheat summit
#

Ok

#

So should I do something like dragging the Spigot.jar under a libns folder?

bronze acorn
#

no

wheat summit
#

libs*

#

Oh

bronze acorn
#

its added to your maven repository or smthn like that

spring arch
#

did you read buildtools guide?

bronze acorn
#

all u have to do is add the dependency into your pom.xml if you're using maven

wheat summit
#

Ok, what's the dependency of it?

#

All I have was

        <dependency>
            <groupId>org.spigotmc</groupId>
            <artifactId>spigot-api</artifactId>
            <version>1.8.8-R0.1-SNAPSHOT</version>
            <scope>provided</scope>
        </dependency>

For the main Spigot APi

bronze acorn
#

replace it with spigot

wheat summit
#

That doesn't work though

sturdy oar
#

install maven local repository

#

with NMS

spring arch
#

wtf

wheat summit
#

Maven local repository?

spring arch
#

did you run build tools

wheat summit
#

Yepp

#

To both ^

bronze acorn
#

have you

#

imported it

wheat summit
#

The Build tools is in a separate file

#

Imported it I doubt

bronze acorn
#

right click maven and click reimport

#

i mean pom

wheat summit
#

OH yeah

#

I did

sturdy oar
#

do you need to import NMS or API? i don't understand

grim halo
#

btw dont listen to anything TheoBuzz (German Branch) sais. He is just trolling hard.

wheat summit
#

NMS

sturdy oar
#

mvn install:install-file -Dfile=path-to-nms-jar \ -DgroupId=your. groupId \ -DartifactId=your-artifactId \ -Dversion=version \ -Dpackaging=jar \ -DlocalRepositoryPath=path-to-specific-local-repo

spring arch
#

no

#

don't do that

sturdy oar
#

yes

#

this is the proper way

bronze acorn
#

in your external libraries do you see spigot added

spring arch
#

it's not lol

bronze acorn
#

i never had to do that

#

the heck lol

wheat summit
#

No

sturdy oar
#

do you use system scope smh

spring arch
#

just run build tools and it will install the jar with NMS

bronze acorn
#

vioer

#

viper

#

did you install 1.8.8

#

did you specify the version

#

when doing buildtools

#

or did you just run it lol

wheat summit
#

I did specify the bounds

spring arch
#

when people try to say something smart but fail

bronze acorn
#

not viper but yeah

wheat summit
#

It's the Artifact ID it doesn't show

sturdy oar
#

im out i don't even know what are you all doing

grim halo
#

If you want to use nms
-> run buildtools on your pc and build the version you need -> this installs everything inside your maven repo automatically
-> then you can just import the spigot artifact instead of the spigot-api artifact in your maven repo

spring arch
#

@wheat summit did you run buildtools?

wheat summit
#

Sorry thought you meant me

#

YES I did

bronze acorn
#

i did

spring arch
#

alright

bronze acorn
#

and you added --rev 1.8.8

#

after

spring arch
#

are you using windows?

bronze acorn
#

the BuildTools.jar

wheat summit
#

Yes

spring arch
#

ok goto %userprofile%

wheat summit
#

@grim halo How would I import the Spigot Artifact? Sorry for the ping!

spring arch
#

it's basically a directory of your user

bronze acorn
#

it shouldve looked like
java -jar BuildTools.jar --rev 1.8.8

wheat summit
#

Yes I did that

spring arch
#

dude can you read actually helpful messages

bronze acorn
#

idk why u have to do all this extra stuff it always just works after buildtools

spring arch
#

can you go to your user directory

bronze acorn
#

lmao

wheat summit
#

I would think it would work

bronze acorn
#

hold on flaming

wheat summit
#

Do I need to do something like put the NMS .jar idf there is one under a libs folder and add it as a dependency that way?

bronze acorn
#

nvm

spring arch
#

dude can u read messages

wheat summit
#

I am...

bronze acorn
#

flaming no unless you're not using maven you'd have to manually add it

sturdy oar
#

you can always use what I just told you 🤷‍♂️ it works and it's the proper way

spring arch
#

so did you go to your user directory?

#

it's not

wheat summit
#

I am using Maven

spring arch
#

dude i ask you to go to your user dir

bronze acorn
#

flaming you probably dont have maven added to your env variables if thats even a thing

spring arch
#

and you tell me that you use maven

wheat summit
#

No I doubt I do actually

bronze acorn
#

flaming if u want to do what darks doing go to C:/Users/youruserhere

wheat summit
#

I don't remember adding Maven as an environmental variable

#

Ok

spring arch
#

finally

wheat summit
#

@spring arch Sorry

#

And for the ping ^

spring arch
#

so did you go to your user directory?

wheat summit
#

Yes

spring arch
#

ok now find a directory named .m2

#

it's your local maven repo

wheat summit
#

Ok

spring arch
#

found it?

wheat summit
#

Yes

spring arch
#

go to repository

wheat summit
#

Ok

spring arch
#

and find org/spigotmc

#

that's a directories you need to follow

wheat summit
#

Weird, I do see them...

spring arch
#

ok

wheat summit
#

minecraft-server and just spigot

spring arch
#

what version do you need

#

yes

wheat summit
#

1.8.8

spring arch
#

so go to spigot

wheat summit
#

Yep

spring arch
#

1.8.8 ofc

#

there is supposed to be a file

#

called pom.xml

wheat summit
#

None

spring arch
#

screenshot?

#

i don't remember how it is called actually

wheat summit
#

spigot-1.8.8-R0.1-SNAPSHOT.pom.lastUpdated

#

That is one ^

spring arch
#

and nothing else?

wheat summit
#

Other is a .jar

#

Then resolver-status.properties

spring arch
#

can you just send a screenshot

#

could be much faster

wheat summit
#

Yes

spring arch
#

and where is a jar

wheat summit
#

The .jar.lastUpdated

grim halo
#

No idea what you guys are doing but i just ran BuildTools and replaced the spigot-api artifact with spigot. Just works...

spring arch
#

pfc it works

#

that a proper way lol

wheat summit
#

That'

spring arch
#

but if he is doing everything right and there is no installed jar

wheat summit
#

s what I tried...

spring arch
#

then he is doing something wrong

wheat summit
#

I don't think Maven is an environmental variable

spring arch
#

you don't need an env variable

wheat summit
#

Oh

spring arch
#

IDEA does everything for you

grim halo
#

maybe check your maven system variable

spring arch
#

you dont need it hello

#

there is already a maven wrapper these days

wheat summit
#

I would think so...

spring arch
#

just like for gradle

wheat summit
#

Ok

#

A lot of other projects have worked so I guess we wouldn't need it

bronze acorn
#

flaming

grim halo
#

Yes but buildtoold does not know that. It needs a set m2 home

bronze acorn
#

i dont think you have to specify

#

a repository

#
<dependency>
            <groupId>org.spigotmc</groupId>
            <artifactId>spigot</artifactId>
            <version>1.8.8-R0.1-SNAPSHOT</version>
            <scope>provided</scope>
        </dependency>```
#

that's all you need

wheat summit
#

Really...?

#

Oh ok

dusky sigil
#

so im doing this - cfg.set("members", membercount + ""); (membercount is 1, int) and if i do this int MemberCount = cfg.getInt("members"); sender.sendMessage("Members on the faction " + args[1] + ":" + MemberCount); and it says 0!

bronze acorn
#

of course with the formatting

dusky sigil
#

the config does say one

bronze acorn
#
    <dependencies>
        <!-- Required Dependencies -->
        <dependency>
            <groupId>org.spigotmc</groupId>
            <artifactId>spigot</artifactId>
            <version>1.8.8-R0.1-SNAPSHOT</version>
            <scope>provided</scope>
        </dependency>
    </dependencies>```
spring arch
#

well buildtools guide does not say anything about any env variables

bronze acorn
#

that would be all you need

#

@dusky sigil

#

you're setting a string it looks like

#

dontt add ""

wheat summit
#

Stioll not working

#

Still*

bronze acorn
#

flaming

#

reimport

spring arch
#

did you press reimport

wheat summit
#

I am yes

bronze acorn
#

at the bottom

dusky sigil
#
                FileConfiguration cfg = YamlConfiguration.loadConfiguration(file);```
bronze acorn
#

there should be a console open

dusky sigil
#

i already created a file named that

bronze acorn
#

@dusky sigil

dusky sigil
#

@bronze acorn gives an error

bronze acorn
#

whats ur cmd like

#

what do you have to do

#

are you doing /command filenamehere

#

?

dusky sigil
#

/f info <faction name> than it brings you the member count

bronze acorn
#

ah ok

spring arch
#

@dusky sigil are you saving the file

wheat summit
#
    <repositories>
        <repository>
            <id>spigot-repo</id>
            <url>https://hub.spigotmc.org/nexus/content/repositories/snapshots</url>
        </repository>
        <repository>
            <id>jcenter</id>
            <name>jcenter-bintray</name>
            <url>https://jcenter.bintray.com</url>
        </repository>
    </repositories>
    <dependencies>
        <dependency>
            <groupId>org.spigotmc</groupId>
            <artifactId>spigot</artifactId>
            <version>1.8.8-R0.1-SNAPSHOT</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
            <version>8.0.20</version>
        </dependency>
    </dependencies>
    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>
#

Sorry that's a bit big ^

bronze acorn
#

remove the repository

dusky sigil
#

@spring arch file itself is looking good

bronze acorn
#

no point of it anymore

dusky sigil
#

oh

spring arch
#

it does not matter

bronze acorn
#

thats what i said 😔

wheat summit
#

Still not working

spring arch
#

or it is 🤔

bronze acorn
#

yeah dont

#

set it as a string

wheat summit
#

Ok

#

Though still not working after removing ^

bronze acorn
#

is mysql registered

#

is it red

#

is that the issue

wheat summit
#

No

bronze acorn
#

is spigot red?

wheat summit
#

SQL is fine

#

Yes

#

org.spigotmc is fine

bronze acorn
#

the heck lol

wheat summit
#

What do you mean?

dusky sigil
#

how can i say with an int?

#

set**

spring arch
#

just pass int?

bronze acorn
#

just yeah

wheat summit
#

Usually dependencies work fine for me

bronze acorn
#

do that

#

lol

spring arch
#

not a string

bronze acorn
#

flaming

#

go to the uh

#

place you compiled buildtools in

wheat summit
#

Ok

bronze acorn
#

is there a spigot-1.8.8 jar in there

dusky sigil
#

cfg.set("members", membercount + ""); (this is a different cfg) this is how i set the membercount

#

what do i change?

bronze acorn
#

remove the + ""

spring arch
#

remove + ""

dusky sigil
#

does that?

#

ohh

bronze acorn
#

lol

wheat summit
#

Looks like it

dusky sigil
#

yeah that makes sense thanks

wheat summit
#

Wait nevermind

bronze acorn
#

try running buildtools again flaming

spring arch
#
  • "" is equal to Integer.toString(membercount)
bronze acorn
#

oh

#

there isnt

#

thats why

#

spigot 1.8.8 never finished compiling

wheat summit
#

I'm not sure

bronze acorn
#

for buildtools

#

run it again

#

java -jar BuildTools.jar --rev 1.8.8

wheat summit
#

There is a Spigot Folder

bronze acorn
#

everytime you compile buildtools the spigot-<version>.jar

#

no

#

in the same directory

#

as buildtools

wheat summit
#

Ok

bronze acorn
#

no subdirectories

grim halo
#

And add a PAUSE on the end of your batch file so you can read what went wrong if the buildtools fails

bronze acorn
#

there will always be a spigot-<version>.jar after you finish running buildtools

#

yeah

#

or you can just do in a gitbash client (assuming u have git bash)

#

actually

#

in a normal cmd prompt

wheat summit
#

I did use gotbash

bronze acorn
#

java -jar BuildTools.jar --rev 1.8.8 PAUSE

wheat summit
#

Gitbash*

bronze acorn
#

yeah u can do that command

#

i believe

spring arch
#

pause will be passed as an argument

bronze acorn
#

oh

#

woops

#
java -jar BuildTools.jar --rev 1.8.8
PAUSE```
spring arch
#

you dont need to use pause if you execute something from command line

bronze acorn
#

create a build.bat file

#

and put that in there

#

yeah

#

ignore everything about pause

#

just open the git bash and do java -jar BuildTools.jar --rev 1.8.8

#

after its done it should tell you build success i believe??

wheat summit
#

Yep

#

Oh wait

bronze acorn
#

?

wheat summit
#

Just saying that I'm doing it

bronze acorn
#

aight

tacit trellis
#

What are premium plugin placeholders used for?

grim halo
#

probably for other plugins that support placeholders...

#

If we are speaking of PAPI placeholders

tacit trellis
bronze acorn
#

its for

#

premium resources

tacit trellis
#

thank you

bronze acorn
#

it-it explains it

#
Spigot placeholders are super useful anti-piracy variables, injected into your plugin upon download.
This means Spigot can track and observe unmodified premium plugins.
You can protect yourself with obfuscation or individual class integrity protection.
Since Spigot replaces these variables in all classes and it tampers with classes in general, JAR Signing or JAR Integrity Protection (for example with obfuscators like Stringer) is only possible when the obfuscator is properly configured.

Now as you may or may not know, Spigot injects its own anti-piracy using these variables, and it's used as a deterrent to inexperienced plugin leaks. The more experienced however, know that anything is crackable, and you should keep this in mind.```
#

e.e

tacit trellis
#

how can I use them though?

bronze acorn
#

"how to use them"