#help-archived

1 messages ยท Page 54 of 1

pastel condor
#

but I don't know how

frigid ember
#

@pastel condor move your add friend code to it's own method, run that method in the onCommand or here

sage flint
#

@frigid ember lov ur profile lol

frigid ember
#

Aye it's pretty hot ๐Ÿ˜Š ๐Ÿ˜‚

pastel condor
#

the add friend method simply adds the players UUID

#

well it adds the players name which checks with my uuid storage method which then adds the uuid as a friend

frigid ember
#

Right, that's all you need no?

#

Providing you're using the InventoryClickEvent

pastel condor
#

I am

#

but I don't want it where a player just types another players name and it adds them

vale slate
#

Ok
@sage flint I can't reproduce your problem, sry

pastel condor
#

it only want the chat thing to go when the player clicked the thing

frigid ember
#

@pastel condor ah so it's a click then enter the name in chat?

pastel condor
#

yes

sage flint
#

Hmm too bad... But thanks for your timemd_5 ๐Ÿ‘ ๐Ÿ‘

frigid ember
#

Right, you'll be better off using a hashmap, when they click the item, add them to the map, listen for an AsyncPlayerChatEvent, when they chat, check if they're in the hashmap, if they are, take the message and run your friend add code, then remove them from the hashmap

#

Or you can just use an arraylist

#

either will work

pastel condor
#

oh okay

#

thanks

#

should I store it in the main class?

west lynx
#

I bought a Plugin 8 Hours ago and i still dont have it. Please help

frigid ember
#

Store it anywhere, just make it static and it should work fine

pastel condor
#

kk

#

thanks

frigid ember
#

@west lynx "Do not use Discordโ„ข as a way of contacting Spigot Staff. If you have an issue with something on the Forums please open a report. Staff will not action requests communicated to them elsewhere."

arctic cedar
#

are there any plugins that can shrink the 1.8 worldborder in stages?

frigid ember
#

Not a clue

#

@pastel condor don't forget to check if they're in the arraylist / hashmap when they leave

pastel condor
#

kk

#

yeah in the playerLeaveEvent

#

omg hash maps look so cool

#

I used to use 2 arrays, but now I can use a hash map!

#

it looks so much better

frigid ember
#

Yeah, they're pretty handy

pastel condor
#

yeah

#

I bet

#

thanks

frigid ember
#

Hello, still looking for a solution to this.

I'm looking for some help to allow my ravager entity to rotate while moving. Currently, the player riding the ravager can rotate the ravager's head and body (see line 40.) While the ravager is in motion (with the player using WASD,) the ravager's rotation resets to a default position . How might I fix this during the movement?
Full code: https://hastebin.com/idexeludow.java

I am using ProtocolLib to handle packets.

Thank you!

native frost
#

Does anyone happen to know what event (if any at all) is triggered by removing a Player passenger from an Armor Stand? All the vehicle, dismount, and sneaktoggle events don't fire

frigid ember
#

Does EntityDismountEvent not fire?

#
    @EventHandler
    public void onVehicle(EntityDismountEvent event) {
        if (event.getEntity() instanceof Player) {
            Player player = (Player) event.getEntity();
            if (event.getDismounted() instanceof ArmorStand) {
                ArmorStand armorStand = (ArmorStand) event.getDismounted();
                // Player is exiting ArmorStand
            }
        }
    }

@native frost pulled from Spigot forum, this was a past working solution

agile rock
#

How do I check when someone shift clicks armor into their armor slots?

frigid ember
#

Just check the ClickType on InventoryClickEvent

native frost
#

I've seen that, EntityDismountEvent doesn't fire

frigid ember
#

Hm it should, that's strange

native frost
#

in case it might help, I'm using the 1.15.2 ver

#

I've tried EntityDismountEvent but it doesn't fire, at all. I tested it and it fires with anything else but the armor stand

lean meadow
#

Hi

#

whatbossbar should i have for a 1.8 server with viaversion?

#

when i use 1.8 i cant se the bossbar

#

in 1.9+ it just glitches and the whole world turns blinking pink

#

the bossbar i tried atleast did that

agile rock
#

Thanks! Also how would I make it so players can enchant swords with custom enchantment books in the anvil?

frigid ember
#

Is anyone able to help me with an issue with ProtocolLib VehicleSteer packets and moving entities?

#

@native frost did you register the listener class?

native frost
#

Basics were done:

  • Listener class registered
  • plugin.yml matches current
  • As noted above, attempted using EntityDismountEvent, VehicleExitEvent, PlayerToggleSneakEvent, etc. (none fire on Armor Stand dismount, all fire appropriately [Vehicle for Boat/Minecart, Entity for Horses/Llamas, etc.])
boreal tiger
#

can you show your code?

frigid ember
#

Not too sure, can't find any other applicable events

#

?paste

native frost
#

EntityMountEvent doesn't even fire when I add a Player as a passenger (unless it really doesn't when you use Entity.addPassenger

worldly heathBOT
vernal spruce
#

why you need it?

boreal tiger
#

what do you mean why you need it?

native frost
#

For context: Making a sitting plugin, and using an invisible Armor Stand as the chair. I'm trying to detect that once the player exits it (Left Shift, as with all dismounts) the armor stand self-destructs
https://paste.md-5.net/edujobupox.cs

#

The codes I've tried are currently commented out above

boreal tiger
#

can we see your main class?

vernal spruce
#

Why not create your own event for it?

#

and simply set the player to sitting

elder storm
#

does anyone know how to add spigot to my tekxit server?

#

or is it even possible

vernal spruce
#

you cant...

#

spigot is not compatible with forge from what i heard

#

also at this point im pretty sure there are mods for w/e plugin you want to add from spigot

elder storm
#

Well is there a way I can use plugins on my server then?

#

yeah

#

good point

vernal spruce
#

you have mods alternative to most things..

boreal tiger
#

what version are you running @native frost

#

of spigot

vernal spruce
#

also wont sneaktoggle trigger

#

when dismounting?

#

you may be able to listen to that event

boreal tiger
#

he did try that, its in the paste

#

did you get the message in the toggle sneak event @native frost ?

vernal spruce
#

well other plugins do it differently

native frost
#

Why not create your own event for it?
and simply set the player to sitting
I don't know how to do that which is my workaround was this in the onEnable():
https://paste.md-5.net/nidebizupo.cs

can we see your main class?
https://paste.md-5.net/tiquyifaza.cs

did you get the message in the toggle sneak event?
no, which is why it's commented out like the others I've tried. When you dismount sneak doesn't trigger (for everything). Especially if you just tap the button

agile rock
#

How would I make anvils able to handle custom enchants?

boreal tiger
#

if you didnt get the message then its not registering the event

#

@native frost what version are you running

vernal spruce
#

@agile rockits easyer to have a custom gui for that

#

there is a reason most enchants plugins don't have anvil mechanics to it

native frost
#

1.15.2

#

also I got the message when I sneak anywhere else so it's definitely registered

#

Just not when dismounting

agile rock
#

Hmm, I wanna try to stick to anvils

frigid ember
#

Does PrepareAnvilEvent not work now?

agile rock
#

Im on 1.8

frigid ember
#

Ah yeah

#

Wasn't added till around 1.10 I think

agile rock
#

yeah, do u guys have any ideas on how I would do this?

frigid ember
#

Not sure if it's possible in 1.8

#

I think you'll find that most of us don't build to 1.8 anymore

vernal spruce
#

yep,only latest for me

agile rock
#

gotcha

frigid ember
#

Only real method I can think would be using the InventoryClick event

#

but it'd be a massive pain in the backside

agile rock
#

D:

frigid ember
#

It's definitely doable

#

It works like a standard inventory, so you'd have to check when they put an item into the second slot, if the item is what you're after, set the last slot to the item you want to give them, when they pick that item up, clear the first 2 slots

#

If anyone has experience with ProtocolLib and is able to figure out this issue, I'm offering a $10 bounty to whomever has a working solution.

I'm looking for some help to allow my ravager entity to rotate while moving. Currently, the player riding the ravager can rotate the ravager's head and body (see line 40.) While the ravager is in motion (with the player using WASD,) the ravager's rotation resets to a default position (at yaw 139.21875). How might I fix this during the movement?
Full code: https://hastebin.com/ofinuqetip.java

I am using ProtocolLib to handle packets.

Thank you!

agile rock
#

@frigid ember Thanks!

frigid ember
#

Hey any staff on? I need to report something

#

@frigid ember quoting the rules, "Do not use Discordโ„ข as a way of contacting Spigot Staff. If you have an issue with something on the Forums please open a report. Staff will not action requests communicated to them elsewhere."

#

No need to tag me I'm right here xD

#

You'd be surprised at how many people send a message then close it lmao

#

Hey guys, are armorstands persistent? Will they delete when the server turns off

pastel condor
#

how can I use the non async PlayerChatEvent?

tiny dagger
#

why would you? ๐Ÿค”

#

it's the same as the async but in sync

#

and deprecated

pastel condor
#

because I need to use the console command sender

#

@tiny dagger

tiny dagger
#

in the player chat event?

#

why don't you just run a bukkit schelduer

#

that turns the code back in sync

pastel condor
#

yeah

#

oh

#

okay

#

ty

tiny dagger
#

no problem

pastel condor
#

so something like this? Bukkit.getServer().getScheduler().scheduleSyncDelayedTask(Main.getInstance(), new Runnable() { public void run() { Bukkit.getServer().dispatchCommand(Bukkit.getConsoleSender(), "region addmember -w " + UUID + " __global__ " + player); } }, 0);

tiny dagger
#

it should be even simpler than this

pastel condor
#

wdym?

tiny dagger
#

Bukkit.getSchelduer().runTaskLater(plugin, () - > {
//Your logic here
}, 0);

#

something like this

#

i need the ide tho

frigid ember
#

Don't send me stupid glitch videos

I was wondering if there's a skript, command, config, etc. to make sand in my case concrete powder float.
I am trying to add a schematic to my server but everytime I add it all the concrete just falls to the ground.

Dm or ping me if you can help

#

@frigid ember you would cancel EntityChangeBlockEvent and BlockPhysicsEvent

velvet hound
#

Does anyone know of a way to contact the people in charge of bukkit?

frigid ember
velvet marten
#

I am making a pvp plugin. I split the players into two teams (using scoreboards) and I disable friendly fire. If a player uses a harful potion it doesnt affect the enemy. But what if they use a regeneration potion, will it only apply to friendlies due to FF off ? Can I check that ?

Thank you !

ocean narwhal
#

Hello one question. Is there a way to have two servers and access the same world of minecraft? I want to have one in Latin America and one in Spain, but all have access to the same map

sharp mauve
#

@velvet marten just cancel the event from affecting them using your plugin, right?

#

@ocean narwhal Absolutely not, unless you add some plugin to sync changes between the two

velvet marten
#

Can I know who throw the potion ?

#

will check it. thanks for the idea anyway ๐Ÿ˜„

ocean narwhal
#

@ocean narwhal Absolutely not, unless you add some plugin to sync changes between the two
@sharp mauve do you know anyone?

torn zephyr
#

Hey! How i can rename my name on SpigotMc

pastel condor
#

I wish I knew

frigid ember
#

you cant

pastel condor
#

I want to change mine

patent monolith
#

I think you need to send them an email

#

the staff

#

I did it before

pastel condor
#

oh

#

which staff?

vernal spruce
#

How do you get a metadata you applied to an entity?

patent monolith
#

apparently you need to donate to change username

#

lol

pastel condor
#

.

torn zephyr
#

oof

pastel condor
#

wow

vernal spruce
#

String areaName = e.getEntity().getMetadata("SpecialMob").toString(); How would i get this properly to the string i set it in the first place?

patent monolith
#

oh

#
Collection<MetadataValue> values = e.getEntity().getMetadata("SpecialMob")
vernal spruce
#

rly its stored

#

as collection?

patent monolith
#

hold on

#

im spoonfeeding some more one sec

vernal spruce
#

its more than enough

patent monolith
#
for (MetadataValue value : values)
  if (value.getOwningPlugin() == YOUR_PLUGIN)
    // ...some code...
#

yeah its kinda weird

#

I wish it was just: e.getEntity().getMetadata("SpecialMob", YOUR_PLUGIN)

#

ok so I read on the Minecraft wiki about haste: Haste is a status effect that increases attack speed by 10% per level and increases mining speed by 20% per level.... Is this 20% compounded per level? Or does it just accumulate in a linear way?

vernal spruce
#

ty works as intended ```for(MetadataValue ob : values){
if(ob.getOwningPlugin() == pl){
areaName = ob.asString();
}
}`

patent monolith
#

nice

edgy sail
#

Is it a known issue that sometimes the placeholders in the downloaded resource jars will not be set?

#

@fleet crane not sure if you're online ๐Ÿ˜›

fleet crane
#

they wont be set if you are downloading your own resource, or your jar cannot be processed by asm

edgy sail
#

Na, I know that

#

I've been getting reports here and there that its not being set from different users

#

Today I've had two reports waiting for me when I woke up

#

One from APimpNamedShane and another from Shade_

fleet crane
#

its either not set for all users, or is

#

there's definitely no issue with it being set for some users and not others

#

if its not set for all users its because your jar cannot be processed by ASM, eg because you compiled for a new java version or used a broken obfuscator

edgy sail
#

Does the placeholders get set even on non-premium?

fleet crane
#

no

edgy sail
#

mm, so there is a chance they're download it from the wrong area.
I suppose I best rename the jars to make it obviouser

frigid ember
#

Hi guys, trying to use Gradle:

repositories {
    maven {
        url = 'https://hub.spigotmc.org/nexus/content/repositories/snapshots/'
        content {
            includeGroup 'org.spigotmc'
        }
    }
}

dependencies {
    compileOnly 'org.spigotmc:spigot:1.15.2-R0.1-SNAPSHOT' 
}

This doesn't seem to actually load Spigot. Do I need to build spigot locally?

fleet crane
#

yes, the server jar is not distributed

#

you should depend on the API unless you require otherwise

frigid ember
#

thanks md5!! will the discord bot ever add a supporter role so we can flex that we donated? hehe

fleet crane
#

I dont know

frigid ember
#

it worked!! ty, is both required?

    maven { url = 'https://oss.sonatype.org/content/repositories/snapshots' }
    maven { url = 'https://oss.sonatype.org/content/repositories/central' }
#

So I can't decompile a plugin and then recompile it because I would like to modify the SQL connection information
Help me please

fleet crane
#

dont know, dont use gradle

frigid ember
#

oh ok, thanks for your help

pastel basin
#

@frigid ember you will need to ask the source code to the plugin's owner

frigid ember
#

He doesn't have it anymore, no way to just modify SqlConnection? and then recompile it

pastel basin
#

it depends on the decompiler you're using, but most likely nothing will change

#

search for other decompilers and try it

frigid ember
#

Okok

#

Thanks

vernal spruce
#

best type to save Entity in?

#

list or set?

pastel basin
#

not much difference, they just change the way the things inside are stored

#

both of them implement Collection

vernal spruce
#

i mean entity is already unique so i guess..

pastel basin
#

set

vernal plank
#

Is it possible to build one of the 1.16 snapshot versions of spigot currently?

frigid ember
#

How do you guys prefer to name your config properties? camelCase, PascalCase, or with underscore/dash?

vernal plank
#

I personally use dashes

frigid ember
#

Usually stick to PC, dashes/underscores often make the names too long for my liking ๐Ÿคท

#

Hey guys, I'm using setInvisible but it's not working on slimes, anyone know what I'm doing wrong?

    net.minecraft.server.v1_8_R3.Entity nmsEntity = ((CraftEntity) bukkitEntity).getHandle();
    nmsEntity.setInvisible(true);
pastel basin
#

cast to a EntitySlime and check if there is a setInvisible method

frigid ember
#

Yeah there is

vernal spruce
#

most likely there is

#

every livingentity seem to have it

#

Also thats im not sure about that way of spawning

#

a entity

#
import net.minecraft.server.v1_15_R1.EntityTypes;
import utils.CEUtil;

public class CustomSkeleton extends EntitySkeleton implements Listener{
    private UHMain pl = JavaPlugin.getPlugin(UHMain.class);
    private Skeleton sk;
    private LivingEntity livsk;
    
    public CustomSkeleton(World world) {
        super(EntityTypes.SKELETON, ((CraftWorld) world).getHandle());
        
        
        sk = (Skeleton)this.getBukkitEntity();
        LivingEntity skeleton = sk;
        livsk=skeleton;
        skeleton.getAttribute(Attribute.GENERIC_MAX_HEALTH).setBaseValue(pl.cskeletonhp);
        ```
#

ignore the double on that livingentity

frigid ember
#

But how can I make it invisible?

vernal spruce
#

in my scenario i simply call

#

skeleton.setinvisible

pastel basin
#

can't you make it invisible with the bukkit api?

vernal spruce
#

aww shit wait nvm

#

you cant make it invis

frigid ember
#

I don't any methods for that

vernal spruce
#

through api

pastel basin
#

LivingEntity#addPotionEffect(new PotionEffect(PotionEffectType.INVISIBILITY, Integer.MAX_VALUE, 1));

frigid ember
#

I didn't want to use potion effects though

vernal spruce
#

you can hide the effects

frigid ember
#

When you guys make a plugin, do you make a "working" version then do it properly or try to code it the right way the first time?

vernal spruce
#

so it would show nothing

frigid ember
#

Ik

pastel basin
#

try code it right, thats the best way to code something

vernal spruce
#

well you know what to do now

#

straight into packets

frigid ember
#

That's my last resort, because I thought using potion effects would be bad practice, it's kind of like a hacky way to do something I thought

#

@frigid ember ???? Why do it twice if you can do it once?

#

hmmm true

vernal spruce
#

PacketPlayOutEntityDestroy @frigid ember

#

Also why slime? Wouldnt a armorstand be better as it has the invis method?

frigid ember
#

For some reason, I can't click the armorstand when it's inside the fake player

#

And when I click the fake player the event doesn't execute

kind berry
#

how do I loop the <Player.getLocation> forever?

frigid ember
#

@kind berry why would you want to?

vernal spruce
#

@frigid ember tried seeting the slime as passanger to the fake player?

#

"armor stand"

frigid ember
#

The slime would still be visible though, I'm going to try PacketPlayOutEntityDestroy then I'll be back momentarily

kind berry
#

@frigid ember Idk I don't think so , I mean I want to get the player location nonestop

frigid ember
#

Why though? Is that really necessary? You could just use a runnable if you really wanted to but it's not ideal in any case

#

If the player's location hasn't changed, there's no need to get the location again? ๐Ÿคท

kind berry
#

I need to, to get it because it will change

lusty vortex
#

@frigid ember Your slime entity isn't turning invisible on 1.8?

kind berry
#

for the plugin

frigid ember
#

No it's not working

lusty vortex
#

Are you possibly not maintaining the datawatcher variable?

#

Did you override the entity?

#

It for sure respects the invisibility status. I use slimes for tons of stuff

frigid ember
#

@kind berry Right, but the move event will call when the player has moved? So if you get it when the player moves and update your variable then, you avoid having to constantly check?

kind berry
#

oh ok thanks

frigid ember
#
        Slime slime = (Slime) p.getWorld().spawnEntity(p.getLocation(), EntityType.SLIME);
        slime.setSize(3);
        slime.setCustomName("stats");
        slime.setCustomNameVisible(true);
        noAI(p, slime);
    private void noAI(Player p, Entity bukkitEntity) {
    net.minecraft.server.v1_8_R3.Entity nmsEntity = ((CraftEntity) bukkitEntity).getHandle();
    nmsEntity.setInvisible(true);
    
    NBTTagCompound tag = nmsEntity.getNBTTag();
    if (tag == null) {
        tag = new NBTTagCompound();
    }
    nmsEntity.c(tag);
    tag.setInt("NoAI", 1);
    nmsEntity.f(tag);
    }

This is what I'm doing @lusty vortex . It doesn't move but it doesn't turn invisible

kind berry
#

oh do I check when a player moves though?

frigid ember
#

@kind berry have you never used events?

pastel condor
#

how can I get the player head of a player (not steve), I know the default Material.PLAYER_HEAD but how do I make it of a player, or an offline player?

kind berry
#

I have but I'm new to coding in java

frigid ember
#

I'll make you an example quickly hold up

kind berry
#

ok thanks that's really helpful

frigid ember
#
    @EventHandler
    public void onMove(PlayerMoveEvent e) {
        
        Player p = e.getPlayer();
        
        p.getLocation();
        
    }
pastel condor
#

then add it in your main too

#

getServer().getPluginManager().registerEvents(new CLASSNAME(), this);

frigid ember
#

^

lusty vortex
#

@frigid ember What happens when you remove all the other stuff other then setInvisible?

#

What's your goal here? To create holograms?

frigid ember
#

I'm trying to make it so when the player right clicks the fake player a gui opens

pastel basin
#

@pastel condor I use this to create a custom head item

        ItemStack head = new ItemStack(Material.PLAYER_HEAD);
        SkullMeta meta = (SkullMeta) head.getItemMeta();

        meta.setOwningPlayer(player);
pastel condor
#

does it work for offline player? @pastel basin

#

like could I use the OfflinePlayer object

lusty vortex
#

Why would you need a slime for that? To create a collisionbox so they interact with the slime, instead of the fake npc?

pastel basin
#

@pastel condor yes

pastel condor
#

ty

lusty vortex
#

But do try just the setInvisible with nothing else. It's possible the client ignores the invisible flag if something like custom name is visible

#

Just to test

frigid ember
#

Alright

#

I needed a slime because when I click the fake player the event doesn't happen

lusty vortex
#

Ah it probably ignores the click

#

Because the fake player doesn't exist server-side

#

You could use packets instead though?

frigid ember
#

wdym?

lusty vortex
#

The server isn't firing an event because the npc doesn't exist server side (If that's what you meant by fake)

#

But the packet will still reach the server

#

So you can intercept it with either Protocollib, or injecting into netty

frigid ember
#

alright

lusty vortex
#

Should be the PacketPlayInUseEntity packet

#

Then just check the "a" integer equals your fake entities ID

pastel condor
#

anyone know what I can use instead of Bukkit.getOfflinePlayer(String uuid)?

lusty vortex
#

Depends on what you're trying to achieve

pastel condor
#

to get an OfflinePlayer object from a uuid string

lusty vortex
#

Why NOT use that?

frigid ember
#

^?

pastel basin
#

Bukkit#getOfflinePlayer(UUID)

pastel condor
#

it's depreciated

pastel basin
#

UUID class instead of string

pastel condor
#

how do I convert sting to uuid then?

frigid ember
#

UUID.fromString(uuid)

pastel condor
#

ah okay

frigid ember
#

??

pastel condor
#

thanks

marsh hawk
#

Is it possible to close an inventory without the InventoryCloseEvent being called. I'm trying to make it so if p1 closes their inv, p2 gets theirs closed but it just makes a recursive loop

sour dock
#

Pretty sure bukkit.getOfflinePlayer does a Mojang username lookup, not getting an offline player from a UUID string

pastel condor
#

oh it does?

#

I don't want a mojang look up

sour dock
#

Is it possible to close an inventory without the InventoryCloseEvent being called. I'm trying to make it so if p1 closes their inv, p2 gets theirs closed but it just makes a recursive loop
@marsh hawk Ignore the event in your plugin after it is called the first time

pastel condor
#

because I have bedrock support, so their uuids wouldn't match

frigid ember
#

Presuming you're talking about bukkit.getOfflinePlayer(String name)??? As it doesn't allow for a UUID to be given as a string?

pastel condor
#

yeah

#

it's deprecated

sour dock
#

Definitely player name, not UUID as a string

pastel condor
#

it has a strikethrough

sour dock
#

It's deprecated because it does an API lookup on the main thread

frigid ember
#

It's also a slight security flaw, thus shouldn't be used unless necessary

sour dock
#

It's only meant to be used by plugins to convert legacy username data files to UUID data files at startup for example

pastel condor
#

ah I see

#

thats odd

#

alex head

pastel basin
#

after using setOwningPlayer did you use item.setItemMeta?

pastel condor
#
        
        final ItemStack head = new ItemStack(Material.PLAYER_HEAD, 1);
        final SkullMeta meta = (SkullMeta) head.getItemMeta();
        final ItemMeta imeta = head.getItemMeta();
        meta.setOwningPlayer(player);
        

        // Set the name of the item
        imeta.setDisplayName(name);

        // Set the lore of the item
        imeta.setLore(Arrays.asList(lore));

        head.setItemMeta(imeta);
        head.setItemMeta(meta);
        
        return head;
    }```
pastel basin
#

use only SkullMeta

wanton delta
#

doesnt SkullMeta implement ItemMeta?

#

yea

#

you said it. lol

pastel condor
#

oh?

frigid ember
#

@lusty vortex do you know why this isn't working?

    ProtocolLibrary.getProtocolManager()
        .addPacketListener(new PacketAdapter(this, ListenerPriority.NORMAL, PacketType.Play.Client.USE_ENTITY) {
            @Override
            public void onPacketReceiving(PacketEvent event) {
            if (event.getPacketType() == PacketType.Play.Client.USE_ENTITY) {
                try {
                Player p = event.getPlayer();
                PacketContainer packet = event.getPacket();
                Entity target = packet.getEntityModifier(event.getPlayer().getWorld()).read(0);

                if (target.getCustomName().equals("stats")) {
                    Inventory inv = Bukkit.createInventory(p, 45, "Stats");

                    inv.setItem(2, new ItemStack(Material.ARROW));

                    p.openInventory(inv);
                }
                } catch (Exception e) {
                }
            }
            }
        });
pastel condor
#

like that? ``` final ItemStack head = new
ItemStack(Material.PLAYER_HEAD, 1);
final SkullMeta meta = (SkullMeta) head.getItemMeta();
meta.setOwningPlayer(player);

    // Set the name of the item
    meta.setDisplayName(name);

    // Set the lore of the item
    meta.setLore(Arrays.asList(lore));

    head.setItemMeta(meta);
    
    return head;```
wanton delta
#

yea

pastel basin
#

yes

pastel condor
#

thanks

pastel basin
#

also you don't need to add 1 to ItemStack constructor as it is set to 1 by default

#

new ItemStack(Material.PLAYER_HEAD) will do the same and will be better to read

lusty vortex
#

@frigid ember What u trying to do?

#

Entity target = packet.getEntityModifier(event.getPlayer().getWorld()).read(0);

frigid ember
#

I'm trying to get the entity that the player hits

lusty vortex
#

Ur entitiy is fake, correct? As in only the player can see it?

frigid ember
#

Yeah

lusty vortex
#

Then you can't do that

frigid ember
#

๐Ÿ˜ฆ

lusty vortex
#

You need to read the int, "a" field from the packet

frigid ember
#

alright

lusty vortex
#

That's the ID

#

Of the entitiy

frigid ember
#

@lusty vortex , I'm stuck on this part, so would this be right?

                PacketContainer packet = event.getPacket();

                packet.getID();
pastel condor
#

because I know this player doesn't have the alex skin

lusty vortex
#

@frigid ember That would just get the packet's ID

pastel condor
#

anyone know why this wouldn't work? ``` final ItemStack head = new ItemStack(Material.PLAYER_HEAD, 1);
final SkullMeta meta = (SkullMeta) head.getItemMeta();
meta.setOwningPlayer(player);

    // Set the name of the item
    meta.setDisplayName(name);

    // Set the lore of the item
    meta.setLore(Arrays.asList(lore));

    head.setItemMeta(meta);
    
    return head;```
frigid ember
#

@lusty vortex , so would this be right?

                PacketContainer packet = event.getPacket();

                packet.getIntegers().read(0);
pastel basin
#

anyone know why this wouldn't work?
@pastel condor Did you check if the player uuid is correct and has a skin?

pastel condor
#

Yes

#

and they are correct

lusty vortex
#

@frigid ember Yeah that should return the "a" ID field

pastel condor
#

should I use using meta.setOwningPlayer(String player); instead of meta.setOwningPlayer(OfflinePlayer player);?

pastel basin
#

you could try

#

not sure if it will work

dusty topaz
#

@pastel condor there isn't a setOwningPlayer(string) afaik

#

pretty sure that is setOwner(string)

frigid ember
#

Hi

pastel condor
#

oh

#

but why does meta.setOwningPlayer(player); not work?

#

where player is an OfflinePlayer @dusty topaz

frigid ember
#

after finally getting use to not typing semicolons in javascriipt, it's sooo weird to actually having to type them in java ๐Ÿ˜ข

pastel condor
#

...

#

semicolons are amazing

dusty topaz
#

player implements offline player

#

so if you're passing in a player object it should 100% work

#

so if it doesn't, the method isn't your issue

pastel condor
#

I'm passing a Offline Player object

#

hmm

frigid ember
#

Just get the profile from the session server, pull the skin, base64 it, put the texture into a gameprofile, then set the meta's profile field to the game profile

pastel condor
#

this is what I have Bukkit.getOfflinePlayer(UUID.fromString(Worker.listFriends(player.getUniqueId().toString()).get(i)))

vernal spruce
#

hmm let me see in a code

frigid ember
#

If setting the owner doesn't work you're gonna probably have to just go around it

#

Should calling a new instance of a class be in the event or can it be in the class field?

#

Pretty sure there's an example of it some where on the forums hold up

pastel condor
#

how would I go around it?

#

kk

pastel basin
#

is player in player.getUniqueId() an OfflinePlayer?

frigid ember
vernal spruce
#

hmm?

#
        ItemStack skull = new ItemStack(Material.PLAYER_HEAD);
        SkullMeta sm = (SkullMeta) skull.getItemMeta();
        sm.setOwningPlayer(Bukkit.getOfflinePlayer(p.getUniqueId()));
        sm.setDisplayName(ChatColor.YELLOW+p.getDisplayName());
        skull.setItemMeta(sm);
        return skull;
    }```
pastel condor
#

thanks

vernal spruce
#

this does it for me

frigid ember
#

Was posted back in 2017 but should still work

vernal spruce
#

also that code is in 1.15.2

pastel condor
#

this is what I have ``` protected ItemStack createGuiHeadItem(OfflinePlayer player, final Material material, final String name, final String... lore) {

    final ItemStack head = new ItemStack(Material.PLAYER_HEAD, 1);
    final SkullMeta meta = (SkullMeta) head.getItemMeta();
    meta.setOwningPlayer(player);
    

    // Set the name of the item
    meta.setDisplayName(name);

    // Set the lore of the item
    meta.setLore(Arrays.asList(lore));

    head.setItemMeta(meta);
    
    return head;
}```
frigid ember
#

@vernal spruce yeah, it appears to be a server issue, some just don't do it for some reason ๐Ÿคท

pastel condor
#

my server is in offline mode, because it's in a bungeecord proxy

vernal spruce
#

offline mode mby?

pastel condor
#

is that it?

frigid ember
#

Probably

vernal spruce
#

idk tbh

pastel basin
#

@vernal spruce why are you passing Player to OfflinePlayer when you could just do sm.setOwningPlayer(p);

vernal spruce
#

idk

#

oh yeah

#

player was deprecated

#

for it

pastel basin
#

Player implements OfflinePlayer

frigid ember
#

Can I call a new instance of a class as a field, or should it be called in a event/method?

pastel basin
#

therefore they are the same

vernal spruce
agile girder
#

Is it possible to take a backup while the server is open
Like, can I download the whole server while is it open or the files are gonna get corrupted because they are trying to modify?

pastel basin
#

@agile girder you can read but cant write

#

so yes

agile girder
#

using sFTP?

#

WinSCP?

pastel basin
#

yes, probably

agile girder
#

...

#

probably?

#

Im dealing with 80gb rn

#

I cant corrupt them xd

pastel basin
#

just download it, if the server is running it wont change anything as you will only read the files not write

pastel condor
#

How do I get the skull on an offline server though?

frigid ember
#

the method I posted earlier should work

vernal spruce
#

or mine,does the job as well

pastel basin
#

or mine,does the job as well
@vernal spruce badly but it does

vernal spruce
#

badly?

pastel condor
#

but I have bedrock support so those skins wouldn't work

vernal spruce
#

im going after latest version wich only accepts offline player

frigid ember
#

Never worked with bedrock tbh

pastel basin
#

@vernal spruce yes, when you can use this instead

public static ItemStack buildSkull(Player p) {
        ItemStack skull = new ItemStack(Material.PLAYER_HEAD);
        SkullMeta sm = (SkullMeta) skull.getItemMeta();
        sm.setOwningPlayer(p);
        sm.setDisplayName(ChatColor.YELLOW+p.getDisplayName());
        skull.setItemMeta(sm);
        return skull;
    }
#

Player and OfflinePlayer are the same, as I said before

vernal spruce
#

its wanting a offlineplayer? ๐Ÿ˜‚

#

try both and see yourself

pastel basin
#

I did it and it works

#

Player class implements OfflinePlayer, ofc it will work

frigid ember
#

ah yes

#

works fine

vernal spruce
#

i totally agree

frigid ember
#

wait shit

#

I used the wrong one

#

That's the text method lmao

#

Owning player works

frigid ember
#

What am I missing in gradle to compile the jar?

repositories {
    mavenCentral();
    maven {
        url = 'https://hub.spigotmc.org/nexus/content/repositories/snapshots/'
        content {
            includeGroup 'org.bukkit'
            includeGroup 'org.spigotmc'
        }
    }

    maven { url = 'https://oss.sonatype.org/content/repositories/snapshots' }
    maven { url = 'https://oss.sonatype.org/content/repositories/central' }

}

dependencies {
    compileOnly 'org.spigotmc:spigot-api:1.15.2-R0.1-SNAPSHOT'
}
#

Doubt you'll find too many people here that use it @frigid ember

#

ok thanks...

silk nymph
#

Can I get some help pls#

#

damn I can't send a pic lol

frigid ember
#

aye you'll need to verify for that

silk nymph
#

I'm typing /help into my server and it says unrecognised use command "/help"

#

how do i verify

frigid ember
silk nymph
#

Ok

#

this is happening

#

Also when I type /help ingame it says I don't have perms for that and I genuinely don't know how to change that lol

#

Anybody got any tips?

runic wadi
#

... that's not in-game

#

that's your console

#

and you exclude the / in your console

#

because everything is a command

silk nymph
#

I know, that's why I said "also"

#

but thanks for the last bit, I have also since figured out how to make myself an operator through the cmd

#

I am not an idiot, but I am learning

agile rock
#

if im adding custom enchants via anvil, how would I charge a custom amount of xp?

radiant pollen
#

@silk nymph You don't use / in console.

#

@silk nymph As far as not having permissions for /help in game, look into a permissions plugin like LuckPerms.

silk nymph
#

That's the exact one I've just installed

#

but I have no idea how to use it

#

I'm trying to figure out but it's pretty overwhelming, is there a guide somewher?

patent monolith
#

@silk nymph have you used permissionsx before?

#

permissionsex*

#

as long as you understand permissions in general, luckperms shouldnt be too bad

#

certain things that you want to do, like create a group or assign permissions to a group, google will solve 99% of that

silk nymph
#

No, I am entirely new to bukkit and spigot

#

You're right

#

But 1 quick question and the rest I think I'll be able to do by myself

#

Are users automatically assigned to default group with luckperms?

patent monolith
#

ask as many questions lol

silk nymph
#

if so, I'm sorted and can do the rest

patent monolith
#

i dont know

silk nymph
#

Alright to forums on google I go, cheers doe

patent monolith
silk nymph
#

Looks like

#

Yeah sweet

patent monolith
#

yeah, pretty much everything i know about bukkit is from google LOL

silk nymph
#

yeah bet lol

#

I've figured out how to create an online editing session of luckperms

#

this is a very refined plugin indeed

patent monolith
#

ohhhh, like an online gui?

#

I think blackixx made something like that

#

for bossshop

#

i like it tbh

silk nymph
#

Ye

#

Altho I'm not sure if all the plugins are showing, which might be problematic

#

I don't really know what's going but I'm just gonna get stuck in

#

I don't understand what weight is on it lmao

#

I understand now

frigid ember
#

Can anyone assist me in adapting a Purpur patch to work in a plugin? Please DM me if so ๐Ÿ™‚

agile rock
#

Anyone hav experience with custom enchants and anvils, im stuck!

patent monolith
#

@agile rock what plugin are you using?

silk nymph
#

Like there are some commands I just can't disable for non op users

agile rock
#

@patent monolith Im creating my own custom enchant plugin, just really confused on how I would be able to add custom enchants on armor via anvil

patent monolith
#

@agile rock with books?

agile rock
#

yea

patent monolith
#

I would suggest hide tags on the enchanted books, then adding lore that says something like "&7Levitation IV&r"

#

then for anvil gui, listen to Inventory events

#

or actually

#

that will work better

agile rock
#

Im on 1.8 so I cant use PrepareAnvilEvent

patent monolith
#

make the server 1.15, then use protocolsupport

#

then restrict the server for only 1.8 clients

#

protocolsupport AND OldCombatMechanics

kind berry
#

I'm trying to make Dream's manhunt game but I can't figure out how to make the compass point to the when he moves

patent monolith
#

when the target is moving, I suggest either using a BukkitTask or PlayerMoveEvent

#

erm, EntityMoveEvent

#

erm, PlayerMoveEvent

#

you can also assign metadata to the targetter with the compass of which player is being targetted

kind berry
#

oh ok thanks that helps a lot

patent monolith
#

yeah np

#

also go in #text and type !verify <your spigot username>

kind berry
#

oh ok

silk nymph
#

I'll let you speak first, dessie

upper hearth
#

Nah you go for it

silk nymph
#

cheers, it's simple i expect anyway

#

non op user, (myself)

#

Can't mine a tree, dunno why

#

Or anything else for that matter

upper hearth
#

EssentialsAntiBuild

silk nymph
#

cheers, it's in

#

i'll sort it thanks

upper hearth
#

Yeah that's what's doing that

#

Does anyone know if there is any kind of benefit to using Maven or Gradle if you're making a private plugin? I've tried in the past to use them and for some reason could never wrap my head around how they work more efficiently than just building artifacts and adding dependencies via modules. Maybe if I use a lot of dependencies they're better? But at what threshold do they become better?

cobalt folio
#

i need help

#

i have a new plugin its called BlockParty-2.0.3.5-ALPHA and everything works fine but when ever someone from my server trys to join through a sign it says "you dont have enough permission to do that" i need this problem to be fixed ASAP

tropic nacelle
#

Well, the solution is simple.

#

Give them the permission.

cobalt folio
#

how

tropic nacelle
#

With a permissions plugin.

cobalt folio
#

i tried that

#

didnt work

upper hearth
#

Then you did it wrong

tropic nacelle
#

ye

cobalt folio
#

could you help me ?

#

if its easier i could call

#

share screen

upper hearth
#

What permission did you give them

cobalt folio
#

well the plugin is called BlockParty-2.0.3.5-ALPHA

#

so

#

i went to consol

#

tryped

#

permission user <username> permission set blockparty true

#

it says permission granted but still same problem

upper hearth
#

What permissions manager are you using?

cobalt folio
#

luckperms

#

i didnt have luckperms before that problem

upper hearth
#

The node is blockparty.user.*

cobalt folio
#

the problem was before i downloaded luckperms

#

do i just type that?

#

i want all my server to have that

#

do i do it for default group?

upper hearth
#

lp user <user> permission set blockparty.user.* true

If you want the entire server to have it, you have to add that to a group and give everyone the group.

cobalt folio
#

i see

#

what do i put instade of uer in your node

upper hearth
#

If you're setting it to a group you put lp group <groupname> permission set blockparty.user.* true

cobalt folio
#

like blockparty.ReplayQ9.* true?

#

like this

upper hearth
#

No. "blockparty.user.*" is the node. Don't change it.

cobalt folio
#

ok

#

let me try

#

it WORKED

#

thank you soo much

#

you have no idea how long im trying to fix it

upper hearth
#

๐Ÿ‘ glad you got it working

cobalt folio
#

so no one has permission to grief my block party they just have permission to join it right?

#

like world edit if i give my self permission for world edit without other perms i would be able to get wand

#

does it work like this

upper hearth
#

People will only have permission to use that stuff if you give it to them or the group they're in.

pastel condor
#

anyone know how I can wait until this finishesBukkit.getScheduler().runTask(SWMPlugin.getInstance(), () -> { before running my next method?

cobalt folio
#

but i gave the default group blockparty.user * true

#

that means everything in block party they can use right

#

dessie

#

dont worry about it

upper hearth
#

@cobalt folio No, they can only use the permissions that the author thinks user's need. Admin permissions are under blockparty.admin.*

cobalt folio
#

aha

#

thanks for the help

upper hearth
#

@pastel condor Couldn't you just call that method at the end of the scheduler? ๐Ÿค”

cobalt folio
#

your amazing

silk nymph
#

Thanks for the help @upper hearth and @patent monolith. it'

#

It is almost ready

pastel condor
#

@upper hearth I guess

#

I'll try that

silk nymph
#

Dessie god

upper hearth
#

:)

cobalt folio
#

you deserve a friend request

#

xoxo

silk nymph
#

He deserves a donation

#

Do you got a link

#

or is that against server rules

upper hearth
#

Can't imagine it is, but you don't need to, that's what this channel is for :D

pastel condor
#

lol

#

I get this error now[SlimeWorldManager] Task #48 for SlimeWorldManager v2.2.1 generated an exception java.lang.NullPointerException: null at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:770) ~[patched_1.15.2.jar:git-Paper-220] at com.sk89q.worldedit.bukkit.BukkitAdapter.adapt(BukkitAdapter.java:120) ~[?:?] at com.voidcitymc.plugins.FreeBuildTools.Worker.lambda$0(Worker.java:301) ~[?:?] at org.bukkit.craftbukkit.v1_15_R1.scheduler.CraftTask.run(CraftTask.java:84) ~[patched_1.15.2.jar:git-Paper-220] at org.bukkit.craftbukkit.v1_15_R1.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:452) ~[patched_1.15.2.jar:git-Paper-220] at net.minecraft.server.v1_15_R1.MinecraftServer.b(MinecraftServer.java:1240) ~[patched_1.15.2.jar:git-Paper-220] at net.minecraft.server.v1_15_R1.DedicatedServer.b(DedicatedServer.java:430) ~[patched_1.15.2.jar:git-Paper-220] at net.minecraft.server.v1_15_R1.MinecraftServer.a(MinecraftServer.java:1157) ~[patched_1.15.2.jar:git-Paper-220] at net.minecraft.server.v1_15_R1.MinecraftServer.run(MinecraftServer.java:946) ~[patched_1.15.2.jar:git-Paper-220]

#

@upper hearth

#

somehow the world is null

#

even though I just loaded it

upper hearth
#

Your plugin is FreeBuildTools I assume? What's line 301 in Worker

pastel condor
#

there is nothing there

#

xD

upper hearth
#

Ehh

#

what

#

I mean that's the line which through NPE

#

Did you delete code? Rerun and see if the line changes

pastel condor
#

It has to be this then: RegionContainer container = WorldGuard.getInstance().getPlatform().getRegionContainer(); RegionManager regions = container.get(BukkitAdapter.adapt(Bukkit.getWorld(player.getUniqueId().toString()))); ProtectedRegion global = regions.getRegion("__global__"); global.getOwners().addPlayer(player.getName());

upper hearth
#

Your world name is the player's UUID?

pastel condor
#

yup

upper hearth
#

Does the world include the dashes or no? I don't remember if getUniqueID().toString() contains those or not. But I would make sure that it matches

pastel condor
#

here is the new error [21:39:32] [Server thread/WARN]: [SlimeWorldManager] Task #48 for SlimeWorldManager v2.2.1 generated an exception java.lang.NullPointerException: null at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:770) ~[patched_1.15.2.jar:git-Paper-220] at com.sk89q.worldedit.bukkit.BukkitAdapter.adapt(BukkitAdapter.java:120) ~[?:?] at com.voidcitymc.plugins.FreeBuildTools.Worker.lambda$0(Worker.java:303) ~[?:?] at org.bukkit.craftbukkit.v1_15_R1.scheduler.CraftTask.run(CraftTask.java:84) ~[patched_1.15.2.jar:git-Paper-220] at org.bukkit.craftbukkit.v1_15_R1.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:452) ~[patched_1.15.2.jar:git-Paper-220] at net.minecraft.server.v1_15_R1.MinecraftServer.b(MinecraftServer.java:1240) ~[patched_1.15.2.jar:git-Paper-220] at net.minecraft.server.v1_15_R1.DedicatedServer.b(DedicatedServer.java:430) ~[patched_1.15.2.jar:git-Paper-220] at net.minecraft.server.v1_15_R1.MinecraftServer.a(MinecraftServer.java:1157) ~[patched_1.15.2.jar:git-Paper-220] at net.minecraft.server.v1_15_R1.MinecraftServer.run(MinecraftServer.java:946) ~[patched_1.15.2.jar:git-Paper-220] at java.lang.Thread.run(Thread.java:748) [?:1.8.0_231]

upper hearth
#

303 now

pastel condor
#

the world includes the dashes

#

RegionManager regions = container.get(BukkitAdapter.adapt(Bukkit.getWorld(player.getUniqueId().toString())));

#

omg

#

even though the method is run after the load method, the world hasn't finished loading

#

by the time I run that

upper hearth
#

Try using WorldLoadEvent

pastel condor
#

but I only want to set this on the first time the world is loaded

#

could I add you to my repo?

#

*git repo

upper hearth
#

Git is one of those areas where I have almost no idea what I'm doing lol

pastel condor
#

I mean just so you can see the code

#

nevermind

upper hearth
#

I might have enough information with what you provided anyways

pastel condor
#

oh okay

#

I somehow need to wait for Bukkit.getScheduler().runTaskAsynchronously(SWMPlugin.getInstance(), () -> { to finish

upper hearth
#

Well you need to just wait for the World to be loaded, yes?

pastel condor
#

but I can't put the methods in that

#

yes

#

theres no "wait" in java

#

well there kinda is

#

nm idk

upper hearth
#

Use WorldLoadEvent

pastel condor
#

Is there like FirstWorldLoadEvent?

#

I guess

#

thanks

#

I'll use a hashmap

upper hearth
#

Are you talking when it gets created?

pastel condor
#

nevermind

#

thanks

upper hearth
#

Alright, good luck.

pastel condor
#

ty

cobalt folio
#

ummmm @upper hearth

#

it didnt work ๐Ÿ˜ญ

upper hearth
#

What didn't work

cobalt folio
#

the thingy permission didnt work

#

it still gives me that you dont have enough permssion

#

wait

#

let me try somethinng

frigid ember
#

Luck perms isn't always too keen on wildcards for some reason

cobalt folio
#

ok ok i got it

#

but 1 thing

upper hearth
#

It's the only permissions the plugin provides.

cobalt folio
#

it works but can i make it like whenever someone joins he will auto gets the perms

upper hearth
#

I don't think they're wild cards, author literally hard coded blockparty.user.*

frigid ember
#

Ah

cobalt folio
#

without me typing lp user <user> permission set blockparty.user.* true

frigid ember
#

Lmao

#

Put that perm in the default group?

upper hearth
#

^

frigid ember
#

All there is to it

cobalt folio
#

ok let me try

frigid ember
#

Use the editor, it'll save a lot of hassle

cobalt folio
#

ok

#

thanks

#

so if i put it in default group it will automatically give them the perms

upper hearth
#

Yes

cobalt folio
#

ok thanks

#

it worked yay

#

thanks alot xoxo

marsh hawk
#

Hey guys so I'm using this:

Field[] allFields = RpgPlayer.class.getDeclaredFields(); 
        for(Field field : allFields) {
            try {
                if (Modifier.isPrivate(field.getModifiers()) && !Modifier.isProtected(field.getModifiers())) 
                field.set(pl, conf.getFile().get(selectedProfile + "." + field.getName()));
            } catch (IllegalArgumentException | IllegalAccessException e) {
                e.printStackTrace();
            }
        }

To load data from a .yml config file. Everything works however I'm getting this java.lang.IllegalArgumentException: Can not set double field me.buby.bubyrpg.persistence.RpgPlayer.experience to null value error for 2 of my variables despite them not being null within the file?

upper hearth
marsh hawk
#

It's a class of mine. #getFile just returns the FileConfiguration

upper hearth
#

Is there a line in the Stacktrace? My guess is that conf.getFile().get(selectedProfile + "." + field.getName()) is returning null because the path is invalid

marsh hawk
#

I have a save method with exactly the same thing that works fine

upper hearth
#

Try to print conf.getFile().get(selectedProfile + "." + field.getName())

pastel condor
#

That didn't work

#

the world was loaded in bukkit, just not swm

#

I think I have to just wait for the world loading thing to finish

frigid ember
#

@pastel condor have you considered running it on the first time a player joins instead?

#

Aka the first time they enter that world

upper hearth
#

That's a good idea

frigid ember
#

Negates the issue of waiting for the world to finish loading

pastel condor
#

Yes, I did that too

#

but I got some other error

frigid ember
#

Might be an easier route to pursue

pastel condor
silk nymph
#

Is there a plugin for asynchronous chunk loading?

pastel condor
#

use paper

upper hearth
#

You can't load worlds async

silk nymph
#

What does use paper mean

upper hearth
#

PaperSpigot

silk nymph
#

Oh, can I use buildtools for that?

pastel condor
#

It's pre-compiled

pastel basin
#

no, there is a dedicated download page

silk nymph
#

If only I had known about this before lmao

pastel condor
#

xD

silk nymph
#

Cheers guys, I'll see how it goes

pastel condor
#

gl

upper hearth
#

Good luck

silk nymph
#

older pc so it's struggling with chunk loading I think

frigid ember
#

What's line 49 of the GUI class @pastel condor ?

pastel condor
#

global.getOwners().addPlayer(player.getUniqueId().toString());

#

it's worldguard

#

api

frigid ember
#

Can you show us the full method?

pastel condor
#

sure

#

if (event.getRawSlot() == 11) {
try {
if (loader.worldExists(player.getUniqueId().toString())) {
Worker.TpToHomeWorld(player);

                RegionContainer container = WorldGuard.getInstance().getPlatform().getRegionContainer();
                RegionManager regions = container.get(BukkitAdapter.adapt(Bukkit.getWorld(player.getUniqueId().toString())));
                ProtectedRegion global = regions.getRegion("__global__");
                global.getOwners().addPlayer(player.getUniqueId().toString());
                
            } else {
                Worker.CreateWorld(player);
                
                
            }
        } catch (IOException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
        
    }
frigid ember
#

It's getting that nullPointer from something, just gotta pin point what

pastel condor
#

ah

#

okay

pastel basin
#

maybe global is null

upper hearth
#

Isn't it __global__?

pastel condor
#

ProtectedRegion global = regions.getRegion("__global__");

frigid ember
#

Probably

upper hearth
#

Oh you have that

#

Discord formatting

pastel condor
#

yeah

#

markup

frigid ember
#

Either that or it's not getting the players uuid for some reason

#

Have it print the UUID prior to adding the owner

pastel condor
#

okay

upper hearth
#

player could be null, where do you define that?

pastel condor
#

it shouldn't be though

upper hearth
#

"shouldn't"

frigid ember
#

@upper hearth inv click event, presumably from the event

upper hearth
#

Wait how does that all of a sudden break if you do your world method when they join? How are those two things connected

pastel condor
#

they both used that method

subtle blade
#

player can't be null. Same method is used above

#

Print values

pastel condor
#

kk

#

restarting the server

#

one minute

pastel basin
#

print global

subtle blade
#

Only possible null value here can be global or getOwners()

pastel condor
#

oh okay

upper hearth
#

Oh I didn't notice the player reference in the if statement

frigid ember
#

^ I should have slept last night but oh well ๐Ÿ˜‚

subtle blade
#

This line makes no sense to me
container.get(BukkitAdapter.adapt(Bukkit.getWorld(player.getUniqueId().toString())));

#

Why is there a world named the same as the player's UUID?

upper hearth
#

Why not

pastel condor
#

Because it's a freebuild server

#

so everyone gets their own world

subtle blade
#

Alright. Just making sure this is intentional

pastel basin
#

what about player.getWorld()

upper hearth
#

That just returns the world they're currently in

pastel condor
#

yeah

cobalt folio
#

guys well basically i already have ip forward for my server but my friend that live far away from me cant join the server but my other friends that lives near me can does anyone have a solution?

pastel condor
#

it didn't print out my vaules

pastel basin
#

oh, the world names are the players uuid? oh i get it now

pastel condor
#

oh

silver pewter
#

Hello, I'm trying to check if player has a certain item on PlayerMoveEvent and send one message any ideas?

pastel condor
#

it only printed the uuid

frigid ember
#

@silver pewter just get their inventory and see if it contains the item?

silver pewter
#

It needs to be in their hands

upper hearth
#

Then check if it's in their hand

frigid ember
#

Right then get the item in their hand

silver pewter
#

I have but it sends a message every time I walk

frigid ember
#

Well yeah, it's firing on you moving

pastel condor
#

oh global is null

pastel basin
#

@silver pewter I think the merthod is Player#getItemInMainHand or Inventory#getItemInMainHand cant remember

frigid ember
#

There you go then

upper hearth
#

It's Player#getItemInMainHand

silver pewter
#

I need to send one message not 100's

cobalt folio
#

@upper hearth

silk nymph
#

Ok wtf is going on lmao

#

Is that server side

subtle blade
#

No, obviously not

#

Looks like a dying graphics card to me

silk nymph
#

Shiet

pastel condor
#

lol

upper hearth
#

@cobalt folio afaik distance shouldn't matter, your friend might be doing something wrong

pastel basin
#

either that or outdated drivers

frigid ember
#

@silver pewter right then you'll need a hashmap to see if you've already sent a message to that player, if you haven't then send it, if you have then don't

upper hearth
#

Activate Windows ๐Ÿ˜ 

cobalt folio
#

@upper hearth he live far and im using my pc to run my servers

silk nymph
#

I meant to, I had to reinstall today

upper hearth
#

@frigid ember HashMap? ๐Ÿค”

silk nymph
#

New drive

upper hearth
#

I think a List would suffice

cobalt folio
#

he can join other servers normally

pastel basin
#

or a HashSet

frigid ember
#

@upper hearth Hash maps > you ok? ok

pastel condor
#

anyway I can fix this from being null? ProtectedRegion global = regions.getRegion("__global__");

upper hearth
#

HashMaps are def better than me

frigid ember
#

I abuse them to fuck, don't mind me ๐Ÿ˜‚

upper hearth
#

Same, they're pretty great

#

But don't forget about our friend the List :(

frigid ember
#

But yeah, an arraylist would do the same job

subtle blade
#

you'll need a hashmap to see if you've already sent a message to that player, if you haven't then send it, if you have then don't
HashSet<UUID> is the better option in this case

pastel basin
#

HashSet<Player> alreadySentMessagePlayers = new HashSet<>();

frigid ember
#

Hashsets are a shout actually, always forget about them lmao

cobalt folio
#

@upper hearth my friends use my public IP address to join my server

subtle blade
#

anyway I can fix this from being null?
Would say that the region index hasn't yet been initialized. Has the world been entered yet?

cobalt folio
#

why 1 of my friends cant join

upper hearth
#

@cobalt folio Is he using the correct port?

cobalt folio
#

i think so

upper hearth
#

Might wanna make sure.

cobalt folio
#

he plays other servers without a problem

pastel basin
#

@cobalt folio can they join with your regular ip? (without ip fowarding)

upper hearth
#

Yeah, and if he types your IP in wrong it won't work.

cobalt folio
#

no

#

even with normal ip

frigid ember
#

Is the server running on 25565 or?

cobalt folio
#

im using bungee

#

i have 3 other servers

#

yes bungee is 25565

#

he joins my server but he just stays in air flying without moving and in his screen he seen nothing but the hotbar

pastel basin
#

well if other people can join and your far away friend can't the problem is on his computer/network provider

frigid ember
#

sounds like a network issue

cobalt folio
#

after 20-30 sec he disconnects

frigid ember
#

Would tell you to try pinging but chances are your router won't respond to it by default

cobalt folio
#

so not from my server being far?

upper hearth
#

Oh I thought you meant he wasn't able to join at all. That's probably a latency issue because of distance.

frigid ember
#

Is the server on your home network?

cobalt folio
#

yea thats what i mean

#

yea

#

home

#

but its a good pc

frigid ember
#

Yeah probably latency due to distance then

cobalt folio
#

any solution?

upper hearth
#

Yes, move the server closer to him

pastel basin
#

upgrade your upload maybe?

cobalt folio
#

how

frigid ember
#

Put it on a plane and fly half way between you? ๐Ÿค”

cobalt folio
#

ahahhaha

#

how to upgrade my uploads

#

you mean the server from 2g to like 6g?

frigid ember
#

Not really any way to solve it without one of you upgrading your connection (which may still not fix the issue) or just using an external host

pastel basin
#

you mean the server from 2g to like 6g?
@cobalt folio
no, your internet upload velocity

cobalt folio
#

wait

upper hearth
pastel basin
#

lmao

upper hearth
#

Your server performance doesn't make a difference here. You can be running the strongest computer in the world, but if it can't communicate with your friend it doesn't matter.

cobalt folio
#

i cant post a pic

upper hearth
#

You need to be verified.

#

Link your Spigot Forums profile.

cobalt folio
#

i have 500 download and 140 upload

#

mbps

#

its a pretty good internet

upper hearth
#

It's distance then, or his internet.

cobalt folio
#

ok then

silk nymph
#

Ok I don't have any of the directX stuff installed, as I have very very recently installed windows? Hopefully that is the problem

#

I'm also downloading geforce experience to get the latest drivers

#

running what I assume is windows compatibility

#

This is no longer spigot based apologies

subtle blade
#

Who hurt this mans

#

Wrong channel. Oh well

#

It's staying sadgery

upper hearth
#

move it right now or i'll tell staff

silk nymph
#

lmao

subtle blade
silk nymph
#

You worried me choco

#

Hopefully it's not failing

frigid ember
#

md_5 he's always watching

pastel condor
#

tysm guys I got my plugin to work!

silk nymph
#

Great to hear! these guys are awesome

#

Ok I don't get this, I'm dropping frames when new chunks load in

#

sharp drops, down to 35/40/50 then straight back up to 60 afterwards

#

This is with paper now

frigid ember
#

@silk nymph sounds more like a client issue, you upped it from 1G?

silk nymph
#

I'm running the server on 4G just for the record, and no I don't think so!

#

NEW WINDOWS INSTALL... lmao

#

I've forgotten so much, thanks for pointing that out that's most likely it

#

Yup it's on 1GB lmao.

#

Thanks man

#

In any case I've probably made the server better which is nice ๐Ÿ˜„

frigid ember
#

aye no worries, easy mistake to make ๐Ÿ˜‚

silk nymph
#

buttersmooth!

#

And let's hope my gpu also isn't failing lmao, I thought everything was breaking

radiant pollen
#

why tf is acf not being resolved. i really want to try using acf but im retarded

last tapir
#

Anyone know a few things about the WorldBorder command ? I have a few questions

devout sierra
#

Is it possible to display blocks for players while not displaying them for others

tiny dagger
#

yea

devout sierra
#

Like asynchronous

pastel basin
#

packets

last tapir
#

Anyone here use the plugin WorldBorder ?

tiny dagger
#

Player#sendBlockChange

pastel basin
#

^ that too

tiny dagger
#

however collising isn't a thing

devout sierra
#

Do players wiggle around when they stand on invisible Blocks on the screen of others

#

Wait wat

#

So those blocks never have collision?

#

Or always have collision but they are invisible

frigid ember
#

No, they're not real blocks

pastel basin
#

I think the collision is only for the player seeing it

tiny dagger
#

no

#

blocks under you glitches you

frigid ember
#

In theory there could be collision, but in practice nah

devout sierra
#

Uh..

pastel basin
#

isn't collision handled by client side

frigid ember
#

To some degree

#

But, if you're stood on a block that's loaded through packet play, the server will count you as flying

#

thus, you'll glitch out and probably get kicked

pastel basin
#

yes, the server will try to fix it

devout sierra
#

Grinds my gears .. is it possible to add collision otherwise

tiny dagger
#

yes

pastel basin
#

just create a real block in the place and send the block change to the block you wanna display

tiny dagger
#

but is it worth the effort?

devout sierra
#

Currently the only thing I could come up with us something like worldborder where it teleports you back

tiny dagger
#

i don't think :p

devout sierra
#

@tiny dagger
Well... What's the point if you can Walk through it anyways

frigid ember
#

What is it you're after? A client side wall?

devout sierra
#

Just theory right now.

Things that this could be useful for is:

Player delivers wood to builder npc,
Builder npc builds bridge for player

Player is supposed to open a giant door with a key... Giant door opena

#

Something like that

frigid ember
#

Ah

devout sierra
#

Obviously this has to be player independent

frigid ember
#

You could send block change to air for each person, until they've "built" the bridge in theory

#

wouldn't like to try putting it into practice though

green hornet
devout sierra
#

So the bridge is always there but displayed like it's not?

frigid ember
#

Yeah

devout sierra
#

What happens if they try to walk where the bridge is

frigid ember
#

you'd have to also then forcefield it, otherwise you'll risk players being kicked without real cause

#

The server will see them as phasing through the block and attempt to correct it

#

For all the server cares, there's a block there ๐Ÿคท

devout sierra
#

Oh ok.. yeah that sucks

green hornet
#

i type this coordinate in game, then teleport to it and leave an the world saves a different mca file? ๐Ÿคทโ€โ™‚๏ธ

devout sierra
#

Kinda ruins the magic begind it

frigid ember
#

Better off building it and just force fielding it tbh

devout sierra
#

That's cheap

frigid ember
#

and a lot less of a pain in the backside lmao

devout sierra
#

Most likely yeah, but sometimes it's the little things that count

pastel basin
#

Maybe try working with velocity? Predict where the player will walk and send them there

frigid ember
#

You'd also have to work around the fact that anyone else's client will see anyone on the bridge as flying, which may cause visual issues

pastel basin
#

It wouldn't glitch

devout sierra
#

You can make semi transparent blocks right

#

Without texture packs

#

That would stop players from looking like they are flying

#

And the players that have to unlock it have a visual representation of what they are lacking

#

I guess I could do something like re-texturing items, then rescale them (if that's possible) and then change the block state from air to the actual bridge

#

I would have to make a converter because I'm not spending my day with placing alot of armor stands

tiny dagger
#

or you can use a barrier

#

:p

devout sierra
#

Could work I think... It's just super finicky

#

They could just walk on that

#

Or what do you mean

#

If I place them as particle they will all look the same I think

green hornet
#

anyone?

devout sierra
#

And they have this weird rotation to it

frigid ember
#

To be honest I'm not sure, never tried to make a block transparent, not even sure it's possible

buoyant path
#

How can I set a players compass target directly in front of them, I've tried to do player.setCompassTarget(player.getDirection().multiply(10)); before but that does not seem to work. Any response would be appreciated ๐Ÿ™‚

devout sierra
#

Me neither lol.
I think I could make items transparent but not actual blocks that aren't coded to be transparent

tiny dagger
#

it's called BARRIER

pastel condor
#

What api changes will there be from 1.15 to 1.16 (In other words will most plugins be compatible?)

tiny dagger
#

i think so..

devout sierra
#

@tiny dagger
A Bridge isn't made out of one texture however

tiny dagger
#

chat is broken for sure

pastel condor
#

Wdym?

tiny dagger
#

it's like full rgb

pastel condor
#

Ah

pastel basin
#

7 million colors support

tiny dagger
#

not sure how that would work

buoyant path
#

So can anyone help with my compass target issue?

pastel condor
#

That would be nice

frigid ember
#

That'll be... interesting lmao

tiny dagger
#

it will be full &a

#

and #53x5f

frigid ember
#

@tiny dagger probably take an RGB value and have a few pre-defined ones on the codes ๐Ÿคท

pastel basin
#

ChatColor.from("#000000")

pastel condor
#

I think Minecraft has a limitation though

#

Like the client itself

bronze marten
#

depends highly on ur monitor, most likely not a minecraft issue lol

tiny dagger
#

yup

#

6bit vs 8 bit

bronze marten
#

it should support RGBA tbh

tiny dagger
#

wut

#

what's a

#

transparency?

frigid ember
#

Red green blue alpha

#

So yeah, transparency

bronze marten
#

yeeess

buoyant path
#

Can anyone help me with setting compass target straight in an inventory?