#help-archived
1 messages ยท Page 54 of 1
@pastel condor move your add friend code to it's own method, run that method in the onCommand or here
@frigid ember lov ur profile lol
Aye it's pretty hot ๐ ๐
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
I am
but I don't want it where a player just types another players name and it adds them
Ok
@sage flint I can't reproduce your problem, sry
it only want the chat thing to go when the player clicked the thing
@pastel condor ah so it's a click then enter the name in chat?
yes
Hmm too bad... But thanks for your time
๐ ๐
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
I bought a Plugin 8 Hours ago and i still dont have it. Please help
Store it anywhere, just make it static and it should work fine
@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."
are there any plugins that can shrink the 1.8 worldborder in stages?
Not a clue
@pastel condor don't forget to check if they're in the arraylist / hashmap when they leave
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
Yeah, they're pretty handy
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!
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
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
How do I check when someone shift clicks armor into their armor slots?
I've seen that, EntityDismountEvent doesn't fire
Hm it should, that's strange
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
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
Thanks! Also how would I make it so players can enchant swords with custom enchantment books in the anvil?
Is anyone able to help me with an issue with ProtocolLib VehicleSteer packets and moving entities?
@native frost did you register the listener class?
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.])
can you show your code?
EntityMountEvent doesn't even fire when I add a Player as a passenger (unless it really doesn't when you use Entity.addPassenger
why you need it?
what do you mean why you need it?
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
can we see your main class?
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
you have mods alternative to most things..
also wont sneaktoggle trigger
when dismounting?
you may be able to listen to that event
he did try that, its in the paste
did you get the message in the toggle sneak event @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 theonEnable():
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
How would I make anvils able to handle custom enchants?
if you didnt get the message then its not registering the event
@native frost what version are you running
@agile rockits easyer to have a custom gui for that
there is a reason most enchants plugins don't have anvil mechanics to it
1.15.2
also I got the message when I sneak anywhere else so it's definitely registered
Just not when dismounting
Hmm, I wanna try to stick to anvils
Does PrepareAnvilEvent not work now?
Im on 1.8
yeah, do u guys have any ideas on how I would do this?
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
yep,only latest for me
gotcha
Only real method I can think would be using the InventoryClick event
but it'd be a massive pain in the backside
D:
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!
@frigid ember Thanks!
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
how can I use the non async PlayerChatEvent?
in the player chat event?
why don't you just run a bukkit schelduer
that turns the code back in sync
no problem
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);
it should be even simpler than this
wdym?
Bukkit.getSchelduer().runTaskLater(plugin, () - > {
//Your logic here
}, 0);
something like this
i need the ide tho
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
Does anyone know of a way to contact the people in charge of bukkit?
If you have experience with entity AI or rideable mobs, please check this thread and offer your advice if you have any:
https://www.spigotmc.org/threads/435160/
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 !
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
@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
@ocean narwhal Absolutely not, unless you add some plugin to sync changes between the two
@sharp mauve do you know anyone?
Hey! How i can rename my name on SpigotMc
I wish I knew
you cant
I want to change mine
How do you get a metadata you applied to an entity?
.
oof
wow
String areaName = e.getEntity().getMetadata("SpecialMob").toString(); How would i get this properly to the string i set it in the first place?
its more than enough
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?
ty works as intended ```for(MetadataValue ob : values){
if(ob.getOwningPlugin() == pl){
areaName = ob.asString();
}
}`
nice
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 ๐
they wont be set if you are downloading your own resource, or your jar cannot be processed by asm
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_
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
Does the placeholders get set even on non-premium?
no
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
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?
yes, the server jar is not distributed
you should depend on the API unless you require otherwise
thanks md5!! will the discord bot ever add a supporter role so we can flex that we donated? hehe
I dont know
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
dont know, dont use gradle
@frigid ember you will need to ask the source code to the plugin's owner
He doesn't have it anymore, no way to just modify SqlConnection? and then recompile it
it depends on the decompiler you're using, but most likely nothing will change
search for other decompilers and try it
not much difference, they just change the way the things inside are stored
both of them implement Collection
i mean entity is already unique so i guess..
set
Is it possible to build one of the 1.16 snapshot versions of spigot currently?
How do you guys prefer to name your config properties? camelCase, PascalCase, or with underscore/dash?
I personally use dashes
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);
cast to a EntitySlime and check if there is a setInvisible method
Yeah there is
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
But how can I make it invisible?
can't you make it invisible with the bukkit api?
I don't any methods for that
through api
LivingEntity#addPotionEffect(new PotionEffect(PotionEffectType.INVISIBILITY, Integer.MAX_VALUE, 1));
I didn't want to use potion effects though
you can hide the effects
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?
so it would show nothing
Ik
try code it right, thats the best way to code something
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
PacketPlayOutEntityDestroy @frigid ember
Also why slime? Wouldnt a armorstand be better as it has the invis method?
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
how do I loop the <Player.getLocation> forever?
@frigid ember tried seeting the slime as passanger to the fake player?
"armor stand"
The slime would still be visible though, I'm going to try PacketPlayOutEntityDestroy then I'll be back momentarily
@frigid ember Idk I don't think so , I mean I want to get the player location nonestop
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? ๐คท
I need to, to get it because it will change
@frigid ember Your slime entity isn't turning invisible on 1.8?
for the plugin
No it's not working
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
@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?
oh ok thanks
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
oh do I check when a player moves though?
@kind berry have you never used events?
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?
I have but I'm new to coding in java
I'll make you an example quickly hold up
ok thanks that's really helpful
@EventHandler
public void onMove(PlayerMoveEvent e) {
Player p = e.getPlayer();
p.getLocation();
}
then add it in your main too
getServer().getPluginManager().registerEvents(new CLASSNAME(), this);
^
@frigid ember What happens when you remove all the other stuff other then setInvisible?
What's your goal here? To create holograms?
I'm trying to make it so when the player right clicks the fake player a gui opens
@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);
does it work for offline player? @pastel basin
like could I use the OfflinePlayer object
Why would you need a slime for that? To create a collisionbox so they interact with the slime, instead of the fake npc?
@pastel condor yes
ty
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
Alright
I needed a slime because when I click the fake player the event doesn't happen
Ah it probably ignores the click
Because the fake player doesn't exist server-side
You could use packets instead though?
wdym?
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
alright
Should be the PacketPlayInUseEntity packet
Then just check the "a" integer equals your fake entities ID
anyone know what I can use instead of Bukkit.getOfflinePlayer(String uuid)?
Depends on what you're trying to achieve
to get an OfflinePlayer object from a uuid string
Why NOT use that?
^?
Bukkit#getOfflinePlayer(UUID)
it's depreciated
UUID class instead of string
how do I convert sting to uuid then?
UUID.fromString(uuid)
ah okay
??
thanks
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
Pretty sure bukkit.getOfflinePlayer does a Mojang username lookup, not getting an offline player from a UUID string
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
because I have bedrock support, so their uuids wouldn't match
Presuming you're talking about bukkit.getOfflinePlayer(String name)??? As it doesn't allow for a UUID to be given as a string?
Definitely player name, not UUID as a string
it has a strikethrough
It's deprecated because it does an API lookup on the main thread
It's also a slight security flaw, thus shouldn't be used unless necessary
It's only meant to be used by plugins to convert legacy username data files to UUID data files at startup for example
after using setOwningPlayer did you use item.setItemMeta?
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;
}```
use only SkullMeta
oh?
@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) {
}
}
}
});
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;```
yea
yes
thanks
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
@frigid ember What u trying to do?
Entity target = packet.getEntityModifier(event.getPlayer().getWorld()).read(0);
I'm trying to get the entity that the player hits
Ur entitiy is fake, correct? As in only the player can see it?
Yeah
Then you can't do that
๐ฆ
You need to read the int, "a" field from the packet
alright
@lusty vortex , I'm stuck on this part, so would this be right?
PacketContainer packet = event.getPacket();
packet.getID();
@pastel basin the head isn't working
because I know this player doesn't have the alex skin
@frigid ember That would just get the packet's ID
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;```
@lusty vortex , so would this be right?
PacketContainer packet = event.getPacket();
packet.getIntegers().read(0);
anyone know why this wouldn't work?
@pastel condor Did you check if the player uuid is correct and has a skin?
@frigid ember Yeah that should return the "a" ID field
should I use using meta.setOwningPlayer(String player); instead of meta.setOwningPlayer(OfflinePlayer player);?
@pastel condor there isn't a setOwningPlayer(string) afaik
pretty sure that is setOwner(string)
oh
but why does meta.setOwningPlayer(player); not work?
where player is an OfflinePlayer @dusty topaz
after finally getting use to not typing semicolons in javascriipt, it's sooo weird to actually having to type them in java ๐ข
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
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
this is what I have Bukkit.getOfflinePlayer(UUID.fromString(Worker.listFriends(player.getUniqueId().toString()).get(i)))
hmm let me see in a code
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
is player in player.getUniqueId() an OfflinePlayer?
@pastel condor https://paste.md-5.net/uhinizinit.js
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;
}```
thanks
this does it for me
Was posted back in 2017 but should still work
also that code is in 1.15.2
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;
}```
@vernal spruce yeah, it appears to be a server issue, some just don't do it for some reason ๐คท
my server is in offline mode, because it's in a bungeecord proxy
offline mode mby?
is that it?
Probably
idk tbh
@vernal spruce why are you passing Player to OfflinePlayer when you could just do sm.setOwningPlayer(p);
Player implements OfflinePlayer
Can I call a new instance of a class as a field, or should it be called in a event/method?
therefore they are the same
saw it,went with it
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?
yes, probably
just download it, if the server is running it wont change anything as you will only read the files not write
How do I get the skull on an offline server though?
the method I posted earlier should work
or mine,does the job as well
or mine,does the job as well
@vernal spruce badly but it does
badly?
but I have bedrock support so those skins wouldn't work
Never worked with bedrock tbh
@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
i totally agree
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...
aye you'll need to verify for that
I'm typing /help into my server and it says unrecognised use command "/help"
how do i verify
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?
... that's not in-game
that's your console
and you exclude the / in your console
because everything is a command
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
if im adding custom enchants via anvil, how would I charge a custom amount of xp?
@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.
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?
@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
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?
ask as many questions lol
if so, I'm sorted and can do the rest
i dont know
Alright to forums on google I go, cheers doe
yeah, pretty much everything i know about bukkit is from google LOL
yeah bet lol
I've figured out how to create an online editing session of luckperms
this is a very refined plugin indeed
ohhhh, like an online gui?
I think blackixx made something like that
for bossshop
i like it tbh
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
Can anyone assist me in adapting a Purpur patch to work in a plugin? Please DM me if so ๐
Anyone hav experience with custom enchants and anvils, im stuck!
@agile rock what plugin are you using?
Like there are some commands I just can't disable for non op users
@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
@agile rock with books?
yea
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
Im on 1.8 so I cant use PrepareAnvilEvent
make the server 1.15, then use protocolsupport
then restrict the server for only 1.8 clients
protocolsupport AND OldCombatMechanics
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
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
oh ok thanks that helps a lot
oh ok
I'll let you speak first, dessie
Nah you go for it
cheers, it's simple i expect anyway
non op user, (myself)
Can't mine a tree, dunno why
Or anything else for that matter
EssentialsAntiBuild
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?
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
how
With a permissions plugin.
Then you did it wrong
ye
What permission did you give them
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
What permissions manager are you using?
The node is blockparty.user.*
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?
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.
If you're setting it to a group you put lp group <groupname> permission set blockparty.user.* true
No. "blockparty.user.*" is the node. Don't change it.
ok
let me try
it WORKED
thank you soo much
you have no idea how long im trying to fix it
๐ glad you got it working
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
People will only have permission to use that stuff if you give it to them or the group they're in.
anyone know how I can wait until this finishesBukkit.getScheduler().runTask(SWMPlugin.getInstance(), () -> { before running my next method?
but i gave the default group blockparty.user * true
that means everything in block party they can use right
dessie
dont worry about it
@cobalt folio No, they can only use the permissions that the author thinks user's need. Admin permissions are under blockparty.admin.*
@pastel condor Couldn't you just call that method at the end of the scheduler? ๐ค
your amazing
Dessie god
:)
Can't imagine it is, but you don't need to, that's what this channel is for :D
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
Your plugin is FreeBuildTools I assume? What's line 301 in Worker
Ehh
what
I mean that's the line which through NPE
Did you delete code? Rerun and see if the line changes
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());
Your world name is the player's UUID?
yup
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
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]
303 now
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
Try using WorldLoadEvent
but I only want to set this on the first time the world is loaded
could I add you to my repo?
*git repo
Git is one of those areas where I have almost no idea what I'm doing lol
I might have enough information with what you provided anyways
oh okay
I somehow need to wait for Bukkit.getScheduler().runTaskAsynchronously(SWMPlugin.getInstance(), () -> { to finish
Well you need to just wait for the World to be loaded, yes?
but I can't put the methods in that
yes
theres no "wait" in java
well there kinda is
nm idk
Use WorldLoadEvent
Are you talking when it gets created?
Alright, good luck.
ty
What didn't work
the thingy permission didnt work
it still gives me that you dont have enough permssion
wait
let me try somethinng
Luck perms isn't always too keen on wildcards for some reason
It's the only permissions the plugin provides.
it works but can i make it like whenever someone joins he will auto gets the perms
I don't think they're wild cards, author literally hard coded blockparty.user.*
Ah
without me typing lp user <user> permission set blockparty.user.* true
^
All there is to it
ok let me try
Use the editor, it'll save a lot of hassle
ok
thanks
so if i put it in default group it will automatically give them the perms
Yes
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?
Why are you reading from the config like that? https://www.spigotmc.org/wiki/config-files/
It's a class of mine. #getFile just returns the FileConfiguration
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
Try to print conf.getFile().get(selectedProfile + "." + field.getName())
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
@pastel condor have you considered running it on the first time a player joins instead?
Aka the first time they enter that world
That's a good idea
Negates the issue of waiting for the world to finish loading
Might be an easier route to pursue
Is there a plugin for asynchronous chunk loading?
use paper
You can't load worlds async
What does use paper mean
PaperSpigot
Oh, can I use buildtools for that?
It's pre-compiled
no, there is a dedicated download page
If only I had known about this before lmao
xD
Cheers guys, I'll see how it goes
gl
Good luck
older pc so it's struggling with chunk loading I think
What's line 49 of the GUI class @pastel condor ?
global.getOwners().addPlayer(player.getUniqueId().toString());
it's worldguard
api
Can you show us the full method?
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();
}
}
It's getting that nullPointer from something, just gotta pin point what
maybe global is null
Isn't it __global__?
ProtectedRegion global = regions.getRegion("__global__");
Probably
Either that or it's not getting the players uuid for some reason
Have it print the UUID prior to adding the owner
okay
player could be null, where do you define that?
it shouldn't be though
"shouldn't"
@upper hearth inv click event, presumably from the event
Wait how does that all of a sudden break if you do your world method when they join? How are those two things connected
they both used that method
print global
Only possible null value here can be global or getOwners()
oh okay
Oh I didn't notice the player reference in the if statement
^ I should have slept last night but oh well ๐
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?
Why not
Alright. Just making sure this is intentional
what about player.getWorld()
That just returns the world they're currently in
yeah
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?
it didn't print out my vaules
oh, the world names are the players uuid? oh i get it now
oh
Hello, I'm trying to check if player has a certain item on PlayerMoveEvent and send one message any ideas?
it only printed the uuid
@silver pewter just get their inventory and see if it contains the item?
It needs to be in their hands
Then check if it's in their hand
Right then get the item in their hand
I have but it sends a message every time I walk
Well yeah, it's firing on you moving
oh global is null
@silver pewter I think the merthod is Player#getItemInMainHand or Inventory#getItemInMainHand cant remember
There you go then
It's Player#getItemInMainHand
I need to send one message not 100's
@upper hearth
Shiet
lol
@cobalt folio afaik distance shouldn't matter, your friend might be doing something wrong
either that or outdated drivers
@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
Activate Windows ๐
@upper hearth he live far and im using my pc to run my servers
I meant to, I had to reinstall today
@frigid ember HashMap? ๐ค
New drive
I think a List would suffice
he can join other servers normally
or a HashSet
@upper hearth Hash maps > you ok? ok
anyway I can fix this from being null? ProtectedRegion global = regions.getRegion("__global__");
HashMaps are def better than me
I abuse them to fuck, don't mind me ๐
But yeah, an arraylist would do the same job
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
HashSet<Player> alreadySentMessagePlayers = new HashSet<>();
Hashsets are a shout actually, always forget about them lmao
@upper hearth my friends use my public IP address to join my server
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?
why 1 of my friends cant join
@cobalt folio Is he using the correct port?
i think so
Might wanna make sure.
he plays other servers without a problem
@cobalt folio can they join with your regular ip? (without ip fowarding)
Yeah, and if he types your IP in wrong it won't work.
Is the server running on 25565 or?
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
well if other people can join and your far away friend can't the problem is on his computer/network provider
sounds like a network issue
after 20-30 sec he disconnects
Would tell you to try pinging but chances are your router won't respond to it by default
so not from my server being far?
Oh I thought you meant he wasn't able to join at all. That's probably a latency issue because of distance.
Is the server on your home network?
Yeah probably latency due to distance then
any solution?
Yes, move the server closer to him
upgrade your upload maybe?
how
Put it on a plane and fly half way between you? ๐ค
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
you mean the server from 2g to like 6g?
@cobalt folio
no, your internet upload velocity
wait
lmao
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.
i cant post a pic
It's distance then, or his internet.
ok then
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
move it right now or i'll tell staff
lmao

he's always watching
tysm guys I got my plugin to work!
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
@silk nymph sounds more like a client issue, you upped it from 1G?
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 ๐
aye no worries, easy mistake to make ๐
buttersmooth!
And let's hope my gpu also isn't failing lmao, I thought everything was breaking
why tf is acf not being resolved. i really want to try using acf but im retarded
Anyone know a few things about the WorldBorder command ? I have a few questions
Is it possible to display blocks for players while not displaying them for others
yea
Like asynchronous
packets
Anyone here use the plugin WorldBorder ?
Player#sendBlockChange
^ that too
however collising isn't a thing
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
No, they're not real blocks
I think the collision is only for the player seeing it
In theory there could be collision, but in practice nah
Uh..
isn't collision handled by client side
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
yes, the server will try to fix it
Grinds my gears .. is it possible to add collision otherwise
yes
just create a real block in the place and send the block change to the block you wanna display
but is it worth the effort?
Currently the only thing I could come up with us something like worldborder where it teleports you back
i don't think :p
@tiny dagger
Well... What's the point if you can Walk through it anyways
What is it you're after? A client side wall?
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
Ah
Obviously this has to be player independent
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
https://dinnerbone.com/minecraft/tools/coordinates/
why doesnt this seem right for me?
So the bridge is always there but displayed like it's not?
Yeah
What happens if they try to walk where the bridge is
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 ๐คท
Oh ok.. yeah that sucks
i type this coordinate in game, then teleport to it and leave an the world saves a different mca file? ๐คทโโ๏ธ
Kinda ruins the magic begind it
Better off building it and just force fielding it tbh
That's cheap
and a lot less of a pain in the backside lmao
Most likely yeah, but sometimes it's the little things that count
Maybe try working with velocity? Predict where the player will walk and send them there
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
It wouldn't glitch
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
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
anyone?
And they have this weird rotation to it
To be honest I'm not sure, never tried to make a block transparent, not even sure it's possible
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 ๐
Me neither lol.
I think I could make items transparent but not actual blocks that aren't coded to be transparent
it's called BARRIER
What api changes will there be from 1.15 to 1.16 (In other words will most plugins be compatible?)
i think so..
@tiny dagger
A Bridge isn't made out of one texture however
chat is broken for sure
Wdym?
it's like full rgb
Ah
7 million colors support
not sure how that would work
So can anyone help with my compass target issue?
That would be nice
That'll be... interesting lmao
@tiny dagger probably take an RGB value and have a few pre-defined ones on the codes ๐คท
ChatColor.from("#000000")
depends highly on ur monitor, most likely not a minecraft issue lol
it should support RGBA tbh
yeeess
Can anyone help me with setting compass target straight in an inventory?
