#help-archived
1 messages · Page 114 of 1
Yeah so put hologram in a hashmap or arraylist depending on what you need to do with it
So put it in a string:armorstand hashmap
= the hologram I want
delete it
and the image with it
but
the image part does not concern you
just the hologram
Holy shit listen to me bud
sry sry
Put the name and armorstand in a hashmap
does it have to be a specific name?
Can be any name
or can it be something like the command argument
And then you can get the armor stand with HashMap#get(name)
It can be the command argument yes
Umm, I'm making a permissions plugin. and the spigot permissions only work for the first player logged in?
See the name as an id
^
ok
That people can refer to to delete and create
@gleaming totem why you out here making a permissions plugin lol
@gleaming totem How do you add perm to your player?
Also you'd have to provide some code if you want help
So Its based in bungee
but then I carry the spigot perms over
PermissionAttachment attachment = p.addAttachment(Main.getInstance());
System.out.println(perms);
for(String perm : perms){
attachment.setPermission(perm, true);
}
attachments.put(p.getUniqueId(), attachment);
p.recalculatePermissions();
Is it a plugin for you / your network or a plugin to put on spigot ?
both
there is a spigot version and a bungeecord version
this is the spigot version
On spigot I mean the forum* sorry ?
Private
Okay, then I strongly advise you not to use Bungee/Spigot permission
Like for each player save a Set of String
I strongly advise against custom permissions plugins in general
It's basically reinventing the wheel
its fun 😉
And so many good alternatives exist already
still, anyone know why it would only work for the first player online?
When do you add the attachment ?
just after the player joins
have to delay the task by half a second so the bungee network has a player online to send the plugin message
Could that somehow be it?
would I do hash map like this?
public HashMap <String, String > imgname = new HashMap<>();
yes
Just without some of the spacing
ok
like in between String and the >
Cool, yep it's midnight time to sleep (3 hours of maths in less than 8h damn)
I also have Lombok in that project
Yep annotations aren't used in the final production nah?
no at least for lombok they automatically get translated into java when you compile
i just verified by decompiling my own jar
i had class marked as @Getter, i decompiled and annotation is gone, and there's all getters methods in class
only thing is that I still have this thing left that I have no idea where it comes from
Is it heavy?
249KB
Anyone have any idea?
Umm, I'm making a permissions plugin. and the spigot permissions only work for the first player logged in?
@gleaming totemPermissionAttachment attachment = p.addAttachment(Main.getInstance()); System.out.println(perms); for(String perm : perms){ attachment.setPermission(perm, true); } attachments.put(p.getUniqueId(), attachment); p.recalculatePermissions();
@gleaming totem
So the error was that the plugin message only sent under the name of the first player that joined
which is weird because it was told to send under a different player
https://sourceb.in/67038e1d6d is there a better way to acheive this?
When I run the server through intellij in debug mode asks me to agree with eula.txt but no eula.txt is being populated
since ItemStacks support 1.16 custom colors for display names, shouldn't setDisplayName really take BaseComponent[] instead of String?
Would anyone happen to know how I could go about making unbreaking 3+ effective? I'm looking to make leather armor as durable as diamond via enchants
Is anyone here aware of guides for porting an existing vanilla server to spigot? I haven't found anything so far
the worlds can be converted, besides that there isn't much to convert
What's the conversion process like? I see some posts on the forum here and there but it's all from like 2016
just drag the worlds into a folder with the spigot jar I think
I mean thats what I did
What are the Strings of a Team object's entries? like, when you do (some team).getEntries(), what is the kind of stuff its returning?
the java docs should say?
Where do I check that? Sorry, I'm new to this
I'll give you a link one sec
it might look like a mess at first, but I would recommend using the search feature in the top right corner
Thank you!
np
http://prntscr.com/su1uqq dang it
It still doesn't explain what an entry is
I've tried printing out individual entries since they're strings, but it doesn't seem to work
I think so? i just don't understand why it says it's returning a set of strings
When you do getEntries()
oh my bad
I read it wrong lmao
I though it said gets the enties on the team
it should return a string set
then you can loop through the set
or do something with it
oop, np
yeah I'm trying to do that atm
i think something's wrong with the command i wrote to print out everything in the set
ah I see
I am trying to see what all of the craftbook features do
But when I got to this page: http://wiki.sk89q.com/wiki/CraftBook/Usage
It doesnt load
@frigid ember unbreaking higher than 3 does nothing
Or, well, it does as much as unbreaking 3
That's untrue.
in 1.15.2?
I've tried vanilla, essentials, mythic mobs artifacts
Any time I enchant it past unbreaking 5 via any means, no luck.
also yes unsafe enchants are enabled, unless there's another one other than essentials
hi guys, is this the proper way of reloading a config?
Main:
public void reload() {
reloadConfig();
config = getConfig();
}
Command:
if (args[0].toLowerCase().equalsIgnoreCase("reload")) {
plugin.reload();
return true;
}
If not, how do I?
If anyone has an answer or ideas why unbreaking past 3 isn't working for me.. I'm all ears. I've been trying to resolve this for like 3 weeks at least, with nooo luck
Does anyone know why old methods for removing the player death screen are no longer working for 1.15? I've looked up some methods for 1.13 and 1.14 but none of them seem to work properly. Here is my current code.
@Override
public void run() {
player.spigot().respawn();
}
}.runTaskLater(JavaPlugin.getPlugin(Main.class), 2L);
player.setHealth(player.getAttribute(Attribute.GENERIC_MAX_HEALTH).getValue());
...```
And yes, the DeathEvent is being registered.
how do you use multiple commands in one yml file
use yml file is new to me and i dont know how to structure it
can you even use more than one command in a yml file
@proper cairn what do you mean by commands
Im trying to see all of the usages for the mechanics in craftbook, but the following link does not load: http://wiki.sk89q.com/wiki/CraftBook/Usage
I saw the one on EngineHub but it does not have all of them
Does anybody have this?
?paste
I keep getting this error https://paste.md-5.net/comasivafo.shell
public static final String DEFAULT = "DEFAULT";
/**
* Get a rank from the string used in config
*
* @param key The Path used in config
* @return A Rank
*/
@Nonnull
public Rank getRank(String key) {
Rank rank = ranks.get(key);
Bukkit.getConsoleSender().sendMessage(key);
Bukkit.getConsoleSender().sendMessage(key);
Bukkit.getConsoleSender().sendMessage(key);
Bukkit.getConsoleSender().sendMessage(key);
Bukkit.getConsoleSender().sendMessage(key);
Bukkit.getConsoleSender().sendMessage(key);
if (rank == null) {
if (ranks.get(DEFAULT) == null) {
rank = new Rank(DEFAULT, "&7", "&7", 0);
ranks.put(rank.getKey(), rank);
} else {
rank = ranks.get(DEFAULT);
}
}
return rank;
}
But rank is non null
@proper cairn wdym?
Second command sorry
I have a second command called flyCommand
like basically how do i get register two commands in the yml file
I see
I don’t believe that would work since onCommand is extended from JavaPlugin as an event whereas FlyCommand isn’t written in the JavaPlugin class
However, you can do this:
if(cmd.getName().equalsIgnoreCase(“test”){
// Do Something
} else if (cmd.getName().equalsIgnoreCase(“test2”){
// Do Something Else
}
I believe
If not, you can make it a multi class plugin where the subclasses for the command implement the CommandExecutor interface
(Correct me if I’m wrong)
^^ You’d then need to register the command in the Main Class onEnable method, you’d just need getCommand(String commandName).setExecutor(new (ClassName), this);
e.g getCommand(“fly”).setExecutor(new FlyCommandClass(), this);
@frigid ember So I think I found out what's up, uh. You can enchant armor with unbreaking but it quickly starts doing less and less, and does no more by like level 15 or so
either way, the increases are so small that you reach a max of like 50% and it doesn't go any higher, so.. even unbreaking 999 on leather pants will only make it last 1.5x as long. I need some way to do more, to make leather last as long as unbreaking 3 diamond armor
change its durability then
sure there is a way you can go above its default durability
I don't know that way though, can't be much help there
Tf any1 seen this before https://pastebin.com/rfjZtshz
I have an issue where about 9080 chunks are staying loaded in, persistent over restarts. Including when players haven't logged into the server after the restart. I've removed every plugin from my server as well, and the chunks are being loaded even before players can log in. Is there something i can check that may be forcing them to pre-load and stay force-loaded?
Is there an event for when two chests merge into a double chest
Tf any1 seen this before https://pastebin.com/rfjZtshz
Show the class which holds the PlayerJoinEvent listener
or @vernal plank you can watch for this kind of thing: https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/block/BlockPlaceEvent.html#replacedBlockState when the block is placed and the blockstate represents a double chest it means it formed a double chest
Do many Java courses teach ternary operations and assignments?
@ashen stirrup probably, hopefully
it's easy though, it's just
Object assignment = condition ? optionTrue : optionFalse;
// or
condition ? optionTrue : optionFalse; // these can represent method calls or whatnot
I know, is it better to teach how to do it rather than efficiency though
If Else statement is easier to understand but ternary statements are more efficient
How do you get rid of the Death Screen when a player dies? It used to be fine with 1.12 and older with just setting the player's health to full. Why isn't this working now? Asking for 1.15.2
I may be wrong on this but you can try it, on the death event, try adding Player.spigot().respawn();
I tried that.
new BukkitRunnable() {
@Override
public void run() {
player.spigot().respawn();
}
}.runTaskLater(JavaPlugin.getPlugin(Main.class), 1L);```
It still shows the death screen. I click Respawn and it doesn't do anything, but the screen is annoying nontheless.
I can try it without. Although, I heard that it needs to be a one tick delay... Let me try without the runnable.
@ashen stirrup hey ok, so basically I have this annoying chat in-game that I am trying to get rid of and I traced it to Towny. How do I get rid of it?
I would post screenshots but I can't rip
Try looking through the config files for possible configurable messages. If worse comes to worst then you can decompile the plugin and remove it but the plugin maybe source code may be obfuscated.
any tips for ctrl + f for
Wdym tips?
if I am going to find something in the config what should I look for
I am new to this :/
The message lmao
@ashen stirrup this is without the runnable.
well, when I type it says [g] [worldname] Default Soupz_ (which is my gt)
Probably long winded but you can check on the EntityDamageEvent if their health is <= 0, then respawn them
like how tf I get rid of these stupid prefixes and stuff
Are you trying to remove the world name?
Yessss
Probably long winded but you can check on the EntityDamageEvent if their health is <= 0, then respawn them
@ashen stirrup Sounds like a plan, thanks.
Essentials Chat?
Check the format for Essentials Chat in the config.yml
ok
can someone help me with uSkyBlock? I keep typing in “/island” on my server but it just keeps saying “/island help”
I have all the stuff needed installed
I keep getting these issues can anyone help? Thanks
Have you added the Spigot JAR file as an external library?
you mean how i download the spigot server .jar thing and put it into something then yes
lmao sorry its my first time
Show me where you put it
@cursive lily make sure your plugin.yml file is named "plugin.yml" not "Plugin.yml" 👍
I recommend using JDK 8 not 13
I’m not too good with Eclipse, but search up JDK 8 online and download it
ok thanks
is anyone able to help with skyblock?
Try checking if the plugin has a support discord
thanks
Thanks
@ashen stirrup Would the fact that I'm using Paper Spigot affect the issue I'm having? 👀
Not too sure in all honesty, Paper Spigot is supposed to be more optimised
Yeah that's what I was thinking.
This is so weird, I have no idea why this is such an annoyance.
Yes that one
ok thanks
And I’m not sure if it overrides the respawn event
It might.
Try with normal spigot?
I find it annoying how 1.15.2 literally changed so many things with the api
I had chunk unloading/loading which was an easy fast way to reset maps and then they just dont work anymore so I had to resort to annoying region block placing creating my own schematics and what not.
I agree, I believe the Inventory.getTitle() was made harder to access, I think you have to go through Inventory.getView().getTitle() for InventoryClickEvent or Inventory.getHolder().getTopInventory().getView().getTitle()
Yeah stuff like that
Do they just have a list of everything that was changed over the past few major updates without causing an anyuerism to read?
And also regular spigot doesn't do anything different. 🤷
Might cause a slight anyuerism
@ashen stirrup Ah lovely.
Different to what
Doing what it did before.
Not skipping the screen
Ok so there is an update for a "Respawn API" that he makes note of
ok so i installed it do you know how to change it over to 8
ok thanks
How experienced are you in terms of Java?
Yes
ok thanks
so i have to redo it right
You should because I don’t think you have imported it correctly
Working?
1 min im very slow lmao
im gonna get a new spigot file because i use the other one to create a new server for testing
Okay, imma sleep now since it’s 5am for me and I haven’t slept so gn, good luck
ok thanks
Is vault also a chat manager and perms manager?
Hey guys does anyone here know how to allocate more cpu cores to a server using mcmyadmin?
ok
Anyone here ever tried making their own perms plugin? i'm thinking about making one, just wondering if they're a huge burden to make
Working with perms with Spigot/Bungee is really annoying ^^ Good luck
@marsh hawk Go check out the source code for LuckPerms, if you want an idea of the scope or difficulty.
LuckPerms is pretty over engineered though. So i don't feel it'd be an accurate representation
Hello, I'm trying to disable explosions on blocks that haven't been placed by players and that are not End Stone or Glass, for my Bedwars minigame plugin, and I tried this code but it doesn't work, I don't really understand why. Thanks in advance for your help ! 😄
@EventHandler
public void onExplosion(BlockExplodeEvent event) {
List<Block> blocks = event.blockList();
for(Block block : blocks) {
if(main.getWhitelistedBlocks().contains(block)) {
if(block.getType().equals(Material.END_STONE)|| block.getType().equals(Material.WHITE_STAINED_GLASS)) {
event.setCancelled(true);
}
}
}
}```
Well, I wouldn't use anything else, over engineered or not, it works well and has a lot of good features.
@cursive flax if you're gonna have a huge list of block types I'd suggest using an ImmutableSet
@cursive flax Do not cancel the event, but just remove blocks you don't want to explode from the blockList
if (main.getWhitelistedBlocks().contains(block) || block.getType().equals(Material.END_STONE)|| block.getType().equals(Material.WHITE_STAINED_GLASS)) {
event.blockList().remove(block);
}
But be careful of ConccurrentModificationException
But be careful of ConccurrentModificationException
@undone narwhal then I should add all blocks to remove in another list and then remove all the content of the list from the blockList ?
So the modifications are made out of the for loop
I think so yes
there is removeIf i believe, which is concurrent safe
BlockExplodeEvent#blockList().removeIf(main.getWhitelistedBlocks::contains)
I tried removing blocks from the blockList and it still explodes and does damage to blocks :/
it seems that the list is immutable
@cursive flax you’re probably just going to have to get the block and set the type to what it was before
Read the javadocs for the event, pretty sure it tells you
I tried adding debug messages to the event
and it seems that the event doesn't even happen
like it's not detected
Double check you havn't forgot to Bukkit.getPluginManager().registerEvents
all my events are in the same listeners class, and other events are working
Where did you put the debug msg?
yo, is DustOptions used with Particle.FALLING_DUST?
@undone narwhal i put one for every iteration of the for loop, and one when the event is called
1.15.2
:/
hi
i have a problem with this code
package me.redpy.tutorial.Events;
import org.bukkit.ChatColor;
import org.bukkit.Material;
import org.bukkit.block.Block;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.block.Action;
import org.bukkit.event.player.PlayerInteractEvent;
public class EventsClass implements Listener {
@EventHandler
public void onInteract(PlayerInteractEvent event) {
Action action = event.getAction();
Player player = event.getPlayer();
Block block = event.getClickedBlock();
if (action.equals(Action.LEFT_CLICK_BLOCK) && block.getType().equals(Material.GOLD_BLOCK))
player.sendMessage(ChatColor.AQUA + "Right click to feed yourself.");
else if (action.equals(Action.RIGHT_CLICK_BLOCK) && block.getType().equals(Material.GOLD_BLOCK)) {
if (player.getFoodLevel() != 20) {
player.setFoodLevel(20);
player.sendMessage(ChatColor.GOLD + "You have been feed.");
}else
player.sendMessage(ChatColor.RED + "You are not hungry");
}
}
}
when i click right it shows me i click twice
but i just click once
So i have one questione, is it correct to use synchronized on a getInstance() method?
inside a singleton uses lazy instantiation
Interact is called twice iirc in 1.9
@torn robin but the left click just once, and the right click twice, btw im working on 1.15.2
I think so, have to check online "Thread Safe singleton"
hi guys i am working on a system to convert old ids to config files like Wool: 1 is translated to 1.15.2 if anyone has any idea let me know thanks
XMaterial might have that
XMaterial is your best friend
no you have not understood for example in a config file there are ids i would like to find a way to replace automatically in config with today's materials
@sturdy oar You have 3 options: synchronize the getInstance(), synchronize(ClassName.class) or create a "holder"
That's enough nah?
i guess so
perfect
what would be the thing to play a notblock sound?
no you have not understood for example in a config file there are ids i would like to find a way to replace automatically in config with today's materials
@floral isle Use XMaterials to get the Bukkit Material and then replace with the name in the config
Player#playNote maybe
ah ok thx
ah okay thank you
https://hub.spigotmc.org/javadocs/spigot/org/bukkit/entity/Player.html#playNote-org.bukkit.Location-org.bukkit.Instrument-org.bukkit.Note-
@late wyvern You have to pass the player, an Instrument object and the Note object in the method
yeah the instrument is because noteblocks can have different sound effects
it makes sense
noteblock is affected by the block beneath it
Instrument is an enum
Right
left
ok because in my World generator i want to create a method to convert old config files
Rolyn I accepted your friend request ❤️
either use someone's else library, or make an enormous switch yourself
it's not hard
just takes some time to read and map all the numbers
I strongly advice you to use XMaterials ^^
hi.
i want to add online players to the team.
but this code doesnt work. how do i fix this?
public class InitCommand implements CommandExecutor {
@Override
public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
Logger log = sender.getServer().getLogger();
ScoreboardManager sm = Bukkit.getScoreboardManager();
Scoreboard scoreboard = sm.getNewScoreboard();
Team playersTeam;
if (scoreboard.getTeam("players") == null) {
playersTeam = scoreboard.registerNewTeam("players");
} else {
playersTeam = scoreboard.getTeam("players");
}
for (Player player : sender.getServer().getOnlinePlayers()) {
playersTeam.addEntry(player.getName());
log.info("add" + player.getName() + "to the team");
}
sender.sendMessage("successfully added members to the team");
return true;
}
}
well scoreboard is always going to have no teams since you're creating a new scoreboard
xd
so there's not really a point in checking if the team is null since it's always going to be null
also you're calling it twice that's not really necessary
how are you testing whether or not someone's added to the team?
Am I the only one person to find Scoreboard Teams stuff a bit tricky?
Yep...
I ran /teammsg and saw the message that I wasn't on the team and thought it wasn't working properly.
scoreboard team and normal team is different thing...? if so, thats very difficult to understand
Hey, i don't have access to nms with paper, I have to include spigot, is it normal ?
yes
Paper download the patched minecraft server in the cache folder. It is not including in the paper jarfile
ok thx
anyone familiar with bedwars?
if so, does anyone know how to fix this annoying issue that only 1 person can pickup items from the gen at the same timeSeriously, all help would be greatly appreciated as this is literally the only reason i wont be able to publish my server :(
Anyone, please?
im sorry but im pretty desperatelol
Hello, is this the place where I can ask questions about my own server and sorting an issue out? Thanks
@jaunty axle go ahead
Simply put: my friends can't see skins and we are set to defaults. Sorry, just cannot find any online resources with a similar problem.
I did, however, change the server to a CraftBukkit server to allow plugins but as it is seen as a new server the players do not have there old data.
If your server is in OfflineMode then use SkinRestorer
Alrighty, will have a look at it. Thanks for the help!
guys
imma about to lose my marbles
didn't you asked the bedwars question already?
are there only 4-5 questions? lol
i've asked the question before but there's a reason why im repeating it obviously
do you think you'll get a different answear?
there arent just 2 people on this server
the bedwars plugin should allow the team to pick the item at the same time
if they are nearby
do you think you'll get a different answear?
i dont actually remember getting any answer lmao so so so sorry
oh
i told you that my bedwars plugin doesn't have that issue lol
i should pay more attention
you can check it on gamster / herobrine servers
I nead help pliz
ask questions here, don't say you have them
can we go back to repeated questions instead? 😂
Does someone know the id of the Pling notification sound
I can send you a link which sound i mean
LevelUp with high pitch?
hey does anyone know how to fix this?
List<Entity> nearbyEntites = l.getWorld().getNearbyEntities(l, 8, 8,8);
it keeps on underlining it in red
it saying required type list
Collection<Entity>
Try it, should do the job
or are you restating my error @undone narwhal
oh
ok
thx man
well my codes not mad
thx
🙂
@undone narwhal
and
@ashen stirrup
Your welcome
thx man
you helped me with code i was searching for for months
love you no homo
🙂
hey does anyone know what event is emitted when a player tries to fire a fake arrow (sent by a packet) or is it just projectile launch?
when you say no homo makes it even more homo btw
no
when you say no homo
it makess it no homo
it depends
if you say all homo
then that makes it more homo
but if you don't say that but say no homo
it removes the homo
it's not like love you is sexualized imo
if (instance of homo) {
homo.remove();
}
not letting people get the wrong idea
How can i add a user a permission inside my plugin ?
p.haspermission
not what he ment
yeah but how can i add the user a permission
Is it ?
you could try just executing console commands from your permission plugin
if player.hasPermission("Permission name here I think") {code that's gonna be executed if they have the permission btw this permission is just if they're oped}
so it's simple
again not what he means
wdym?
no
I would just like to add the user a permission
no
adding a permission in the sense of allowing the player to do stuff which requires that permission
yeah
How to suppress the log of Bungeecord? I don't want to write logs to file.
I tried using this but it only works if ur op
if(inventaire.getName()== "Classes") {
if(current.getType()==Material.BONE) {
event.setCancelled(true);
Bukkit.dispatchCommand(player, "lp user "+player.getName()+" permission set lg.perm");
Bukkit.dispatchCommand(player, "lp user "+player.getName()+" permission unset vm.perm");
Bukkit.dispatchCommand(player, "lp user "+player.getName()+" permission unset bk.perm");
}
if(current.getType()==Material.DRAGONS_BREATH) {
event.setCancelled(true);
Bukkit.dispatchCommand(player, "lp user "+player.getName()+" permission set vm.perm");
Bukkit.dispatchCommand(player, "lp user "+player.getName()+" permission unset lg.perm");
Bukkit.dispatchCommand(player, "lp user "+player.getName()+" permission unset bk.perm");
}
if(current.getType()==Material.DIAMOND_SWORD) {
event.setCancelled(true);
Bukkit.dispatchCommand(player, "lp user "+player.getName()+" permission set bk.perm");
Bukkit.dispatchCommand(player, "lp user "+player.getName()+" permission unset vm.perm");
Bukkit.dispatchCommand(player, "lp user "+player.getName()+" permission unset lg.perm");
}
do you get any errors
if(inventaire.getName()== "Classes") is that checking true? is the name with no color or anything just Classes?
so the only way is to open the menu and then op yourself
You compare strings with equals() or equalsIgnoreCase() not ==
also "disaptchCommand(player)"
its basically mimicing a player sending that command
you need the console to do it
try using Bukkit.getConsoleSender() instead of player
if(inventaire.getName().equalsIgnoreCase("Classes)){}
@vernal spruce it works, the only probleme is because this menu is only opening if u don't have the permission
yeah but those it work if u don't have any permissions ?
?? this is making it more confusing
i just want user that don't have any permissions to be able to get one of these permissions
You can check if a player has a permission with Player.hasPermission(String permission)?
also wait,it works?
hes executing the dispatchCommand from a player
you mean you gave a player permission to luckperms?
already done, the only problem is adding the permission
thats why it only works if youre opped
that is it
if a player is op
Oh yeah
all .hasPermission return true
i already said replace player in dispatchCommand with Bukkit.getConsoleSender()
does it work ?
Bukkit.dispatchCommand(Bukkit.getConsoleSender(), String command);
try it
im worried when you say "it works",that can mean a default player has acces to luckperms
No, it works for OP because they have permission
yeah but Bukkit.dispatchCommand(Bukkit.getConsoleSender(), String command);
Change player in dispatchCommand to Bukkit.getConsoleSender() so it's executed from console
so like this ? Bukkit.dispatchCommand(Bukkit.getConsoleSender(), String command);
Replace String command with the command
oh boy..
obvs
how can I spawn a fake light source ?
ok
"fake source"?
light*
yep ^^
Probably achievable with NMS?
I tried this code I found on internet
Chunk chunk = ((CraftChunk)loc.getChunk()).getHandle();
chunk.a(EnumSkyBlock.BLOCK,loc.getBlockX() & 0xF,loc.getBlockY(),loc.getBlockZ() & 0xF,15);
But the method chunk.a() cannot be resolved :/
or messy way working with packets to hide a torch..
that looks like its setting the sky light level(default to 14 i think),dont think it actually creates a light source
That's NMS
I'm not familiar with nms, all the a(), b() etc.. I don't see what they mean
not very readable :/
there should be a map somewhere for the chunk with actual methods
thats the point of obfuscation..
Use ProtocolLib
what
uh i think you could cancel the packet send
dont think its achieveable without having ur own holograms plugin
its still really tricky to do with catching the right packets
hmm
by tricky i mean finding out wich hologram should you stop
meaning you have to dig through saved holograms from another plugin..
it's in a radius
why you want to do that though?
well i'm giving my images names
and the hologram is suppposed to show the user which name
is the image
and if they wanna replace or delete the image
they know which one they are doing
are you trying to do a authetincation plugin?
is the plugin yours
are you familiar with packets?
umm
well
guess not
but i can show you my code
Player player = (Player) sender; World world = (World) firstFrame.getWorld(); Location location = (Location) firstFrame.getLocation(); ArmorStand hologram = (ArmorStand) world.spawnEntity(location, EntityType.ARMOR_STAND); hologram.setVisible(false); hologram.setCustomNameVisible(true); hologram.setCustomName(ChatColor.LIGHT_PURPLE + name);
oh boy its not even packet based holograms?
...
well try sending a changeBlock to a player wich doesnt have permission and see if it removes it
is there a way I can use an if statement to mnake them invisible
Is there an api from spigot to check if a plugin got an update?
dont think so,there is one to have ur own plugin say if there is an update..
hey does anyone know what event is emitted when a player tries to fire a fake arrow (sent by a packet) projectile launch doesnt seem to work
wdym a fake arrow?
the event should only get called if an actual entity is involved(arrow),same with the most common problem trying to rightclick a npc
if the arrow is packet based,everything about it will be packet..
the arrow is put into the inventory with a packet so that the player can shoot the bow
cus i want to make a bow which doesnt require arrows
what packet would i need to listen on
Hello,** I have a problem when I start my server**: spigot.jar in 1.15.2. The crash text is displayed below.
otherwise find where entityshootbowevent is called then start looking around
all packets
except chat packets
Loading libraries, please wait...
java.lang.OutOfMemoryError: Java heap space
at java.util.HashMap.resize(Unknown Source)
at java.util.HashMap.putVal(Unknown Source)
at java.util.HashMap.put(Unknown Source)
at net.minecraft.server.v1_15_R1.MapGeneratorUtils.a(SourceFile:21)
at net.minecraft.server.v1_15_R1.MapGeneratorUtils.b(SourceFile:15)
at net.minecraft.server.v1_15_R1.BlockStateList.a(SourceFile:47)
at net.minecraft.server.v1_15_R1.BlockStateList$$Lambda$145/25240705.accept(Unknown Source)
wait couldnt i just create my own event and fire an arrow on that
at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(Unknown Source)
at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(Unknown Source)
at java.util.stream.ReferencePipeline$3$1.accept(Unknown Source)
at java.util.Spliterators$ArraySpliterator.forEachRemaining(Unknown Source)
at java.util.stream.AbstractPipeline.copyInto(Unknown Source)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source)
at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(Unknown Source)
at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(Unknown Source)
at java.util.stream.AbstractPipeline.evaluate(Unknown Source)
at java.util.stream.ReferencePipeline.forEach(Unknown Source)
at java.util.stream.ReferencePipeline$7$1.accept(Unknown Source)
at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(Unknown Source)
at java.util.stream.ReferencePipeline$3$1.accept(Unknown Source)
at java.util.Spliterators$ArraySpliterator.forEachRemaining(Unknown Source)
at java.util.stream.AbstractPipeline.copyInto(Unknown Source)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source)
at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(Unknown Source)
at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(Unknown Source)
at java.util.stream.AbstractPipeline.evaluate(Unknown Source)
at java.util.stream.ReferencePipeline.forEach(Unknown Source)
at java.util.stream.ReferencePipeline$7$1.accept(Unknown Source)
at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(Unknown Source)
at java.util.stream.ReferencePipeline$3$1.accept(Unknown Source)
at java.util.Spliterators$ArraySpliterator.forEachRemaining(Unknown Source)
at java.util.stream.AbstractPipeline.copyInto(Unknown Source)
I have sixteen go ram
i allowed 4GO in java
it only needs 1 tho java
well its not enough with the stuff you want to run
but i can't allowed better 4GO for Java
you need to set xms and xmx flags
^
Is there something like a ConfigurationDeserializable ?
or i have to deserialize 'by hand'?
it seems like Bukkit has never implemented any sort of API to deserialize custom objects from a config
Is there a way to check if a user is holding a block within their cursor?
e.g. When in an inventory, picking up a block with your mouse
Unfortunately, putting values -Xmx and -Xms of 4095M my cmd told me the exact same thing. So I set an environment variable _JAVA_OTPTIONS to -Xmx4095M. And I would like to have a solution to this one.
depends on what you want to @sturdy oar
well i have a simple object that consists of 2 strings
but I have a list of them
I currently deserialize this way
bye
Can someone recomend cpu and ram for a server with 100 slots and no rules?
depends on the plugins
I have intel i7 2600k and 16gb cpu and tps drops pretty often without lag machines
I don't have a lot of plugins. The server is semi vanilla
I didn't understand that. Why is it bad to have too much ram?
i think because of garbage collector system and the spikes it would have
So what do I do if the ram is full? Wouldn't it be better to have more ram so garbage collector works less?
i'm not the person tho to ask this
aikar i think would have a wall of text for you on why is bad
8-10Go is the best for Minecraft servers
More or less is bad
You can configure the garbage collector with start args
not really
10 gigs is ok if the server is almost completely vanilla
also i7 2600k only allows ddr3 so id suggest upgrading that
What is easier when needing to save data?
A yaml or json file?
for minecraft yaml
that comment makes no sense
with gson json is really easy to write
it just depends what you need it for
likely yml for configurations is easier
saving objects likely json
or refer to sth thats actually meant for saving large amounts of data, a proper db
You can configure the garbage collector with start args
@undone narwhal I use some starting arguments from the top post on spigot forum, I don't think I can configure it better
also i7 2600k only allows ddr3 so id suggest upgrading that
@hard crane what processor would you suggest?
depends what you need but definitely something newer than second gen
depends what you need but definitely something newer than second gen
@hard crane would Intel Core i7-3770 be better?
thats still third gen
newest rn is 9th
you dont need the newest but i would take a lower one than 6th
Hi, I spawned some campfire smoke, but the particles go in every directions. How do I tell them to go upward ?
without out tailoring the GC to handle large ram allocations, it is bad to assign a large amount of ram to the application @kind crow what ends up happening is that without the GC being tailored for this, it will take a bit longer for the GC to kick in because most of the time it waits till heap space is used up to start doing so. If that space is large, well GC has to catch up and thus can cause your application to freeze for a bit of time. Not typically wanted in a server software. Tailoring the GC isn't an easy process and requires tools to monitor the application and GC to know what needs to be altered and there is many flags to alter the GC. So, it is just best to stick with no more then about 10GB or so and using flags that are searchable to use and stick with those unless you know what you are doing 😛
does anyone know how to cancel a packet?
i'm trying
to not let a player without permissions see the hologram
this is for animated frames
so I can see the images name
and if i want to replace it or delete it I know what image it is without making a mistake
help me
my eclipse froze
it wont close
:(
help me
plz
i can see you typing
Just downloaded CMI, but all of the commands require /cmi infront of them including basic ones such as /spawn, I have turned every single command to true in the alias file, not sure what else to do. I have proceeded to add all of the commands individually into my commands yml however just wondering if there is a better way
???????
@lilac cradle just use task manager to kill it
without out tailoring the GC to handle large ram allocations, it is bad to assign a large amount of ram to the application @kind crow what ends up happening is that without the GC being tailored for this, it will take a bit longer for the GC to kick in because most of the time it waits till heap space is used up to start doing so. If that space is large, well GC has to catch up and thus can cause your application to freeze for a bit of time. Not typically wanted in a server software. Tailoring the GC isn't an easy process and requires tools to monitor the application and GC to know what needs to be altered and there is many flags to alter the GC. So, it is just best to stick with no more then about 10GB or so and using flags that are searchable to use and stick with those unless you know what you are doing 😛
@keen compass thanks for the detailed answer. Do I need to restart the server a couple of times a day or I don't need that if everything confugured corectly? But I noticed that after some time the server takes all the ram and starts to lag. After restart it's fine again. I use that start script https://aikar.co/2018/07/02/tuning-the-jvm-g1gc-garbage-collector-flags-for-minecraft/
ok
@kind crow you should set up an auto restart for your server
I run mine every 24 hours automatically
@kind crow most people restart their server daily, but if you have decent plugins and everything set up properly you can easily let a server run for days or months at a time before restarting it. Just depends what you have going on. Non-optimal plugins tend to force you to restart your server more often especially if they have memory leaks
longest I have gone without restarting my server is like 3 months
yeah I restart once a week
I need to restart two times a day with my configuration
if you NEED to restart, you have some issues
otherwise I have a lot of lags
as I said, most of the time it is caused from non-optimal plugins
you SHOULD restart , but not NEED to
it stopped thanks
I could have 64gb of ram, but as that guy said its kind of bad
its not that it is bad
it is bad if you don't tailor the GC to handle it
GC may be smart, but it is still dumb in a way
Is there a seed in spigot.yml that changes woodland mansion locations?
nevermind, i can just test and /locate it
does eclipse have a discord
lmao no
Eclipse is a game it's well known
java.lang.NullPointerException: null
at fr.gnaboo.gnanplugin.GnanPlugin.onEnable(GnanPlugin.java:31) ~[?:?]
at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:264) ~[spigot-1.12.2.jar:git-Spigot-dcd1643-e60fc34]
at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:337) [spigot-1.12.2.jar:git-Spigot-dcd1643-e60fc34]
at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:403) [spigot-1.12.2.jar:git-Spigot-dcd1643-e60fc34]
at org.bukkit.craftbukkit.v1_12_R1.CraftServer.enablePlugin(CraftServer.java:381) [spigot-1.12.2.jar:git-Spigot-dcd1643-e60fc34]
at org.bukkit.craftbukkit.v1_12_R1.CraftServer.enablePlugins(CraftServer.java:330) [spigot-1.12.2.jar:git-Spigot-dcd1643-e60fc34]
at net.minecraft.server.v1_12_R1.MinecraftServer.t(MinecraftServer.java:422) [spigot-1.12.2.jar:git-Spigot-dcd1643-e60fc34]
at net.minecraft.server.v1_12_R1.MinecraftServer.l(MinecraftServer.java:383) [spigot-1.12.2.jar:git-Spigot-dcd1643-e60fc34]
at net.minecraft.server.v1_12_R1.MinecraftServer.a(MinecraftServer.java:338) [spigot-1.12.2.jar:git-Spigot-dcd1643-e60fc34]
at net.minecraft.server.v1_12_R1.DedicatedServer.init(DedicatedServer.java:272) [spigot-1.12.2.jar:git-Spigot-dcd1643-e60fc34]
at net.minecraft.server.v1_12_R1.MinecraftServer.run(MinecraftServer.java:545) [spigot-1.12.2.jar:git-Spigot-dcd1643-e60fc34]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_252]```
GnanPlugin.java:31
java.lang.NullPointerException
so sth is null on line 31 of GnanPlugin
xd
🤔

Hello i don't know if i can ask her here i would like to know how to pause my code to execute a function after without using wait () or sleep (), thanks for your help
bukkit schelduer
hi guys an opinion this logo how do you like it?
It's green so I love it
it's for my plugin
maybe some custom tress on the side of |AWG|
I would set the left/right tilt to a value a bit less, it makes the text look distorted
And to add to @brisk fog, I think it would be cool to add some trees on the top of the "AWG" as well as beside
ok this logo was made by a friend of mine then I ask him if he can add things to it
the plugin is work in progess the code are here is open source
maybe change where the crack is on the A makes it look a bit like an R
nice
How time works with test.runTaskLater (Main.instance, 50); for example 50 here makes 3sec
ah thx
runTaskLater(Main.instance, 20*5); yeah is good thx !
TimeUnit is a thing too
guys
what do you think would make bungee mode/ autojoin more complete for a minigame? 🤔
i've come up with these atm
Hey! How would I set the visible names of players to something else?
For some reason using player.setDisplayName() isn't working for me
Tried calling it on Login and Join Events ^
im wondering if there's a gamerule that disable a effects
Anyone else having issues with .setDamage(0)??? repairs the item up to 1 durability of its max...
what do you mean by a effects @frigid ember
potions effects
aww
Sorry if this would be a complicated topic though how would I use the packets?
Damageable damage = (Damageable) meta;
damage.setDamage(0);
item.setItemMeta(meta);
And this is in my repair method
takes the item as an input
@wheat summit wiki.vg/Protocol and use ProtocolLib
Ok thanks a lot!
one thing more
so im using Multiverse Core and my effects in world 1 applied too in world 2
any way i can stop that?
pls ping if anyone could help
Whats the best free custom mobs plugin for spigot 1.8.8
Hello, anybody know a good plugin for jump pad please? I test a lot of plugin for jump pad but never work 😢
I used this one a wile back @remote ore
https://www.spigotmc.org/resources/custom-jumppads-1-8-1-15.44876/
There is a vid on how to setup a launch pad
@broken patio thank you I will try it 😉
np!
Okay
I have a 1.16 server with Fabric right now
I want to install a rollback plugin or datapack
Anyone know a datapack that does that? Or how to install plugins on fabric
or even how to get spigot/paper/or anything 1.16
how do I run the server with more ram
java -Xmx1G -jar server.jar
Xmx1G is the amount of MAX ram
so in that thing its 1GB
i tried that and it said it couldn't find the sever file
whats your jar file called?
spigot-1.15.2.jar
java -Xmx1G -jar spigot-1.15.2.jar
thats what I did
u running on host or local hosting it?
yes
which one?
localhost
that should work tbh
File f = new File("plugins/");
if (!f.exists()) {
f.mkdirs();
Logger.info("Creating Folder Names Test");
}
im i missing something? lmao
Place more torches xddd
I do not understand the issue cause : when the method opt not found the object, it create a NullPointerException at the return point for this method below.
private Object getObject(String path) {
if (path == null || path.length() < 1)
return this.json;
JSONObject jpath = this.json;
int end = -1;
int begin;
while ((end = path.indexOf(this.PATH_SEPARATOR, begin = end + 1)) != -1) {
String key = path.substring(begin,end);
JSONObject check = jpath.optJSONObject(key);
if (check == null)
return null;
jpath = check;
}
return jpath.opt(path.substring(begin));
}```
Method `opt` is simply :
```Java
public Object opt(String key) {
return key == null? null : this.map.get(key);
}```
My question is : have you an idea about the cause of `NullPointerEception` ??
Full stack :
java.lang.NullPointerException: null
at me.N4TH4NOT.Core.config.commun.ConfigurationFile.getObject(ConfigurationFile.java:43) ~[?:?]
at me.N4TH4NOT.Core.config.commun.ConfigurationFile.get(ConfigurationFile.java:79) ~[?:?]
at me.N4TH4NOT.Core.config.commun.ConfigurationFile.get(ConfigurationFile.java:85) ~[?:?]
at me.N4TH4NOT.Core.config.Settings.reload(Settings.java:53) ~[?:?]
at me.N4TH4NOT.Core.config.Settings.<init>(Settings.java:22) ~[?:?]
at me.N4TH4NOT.Core.Main.onEnable(Main.java:58) ~[?:?]
...```
You didnt initialise begin
if the condition in the while loop is false at first, it will never execute the body
Try setting it to zero or sth
I'm trying to use the ProtocolLibrary though for some methods or packets like PacketType.Play.Server.PLAYER_INFO I can't find what the different values are or how to change them
@meager vale @bronze marten looks like begin is assigned in the conditional of the while loop
@wheat summit check out https://wiki.vg/Protocol#Player_Info
Ah yes, then i guess look into jpath, maybe thats null
Ok thanks, I think I got it now
Is there a way to export a list of all commands your server has? I have more than 2900 and console cant hold that many
That's a lot
Hmm
If console can't hold that many you can do some checks and if it goes above the count of chartacters for console it can send in a new message
Using Protocol Lib and using the Wiki and according to the Player Info part I tried this:
ProtocolManager protocolManager = ProtocolLibrary.getProtocolManager();
PacketContainer packetContainer = protocolManager.createPacket(PacketType.Play.Server.PLAYER_INFO);
packetContainer.getModifier().writeDefaults();
packetContainer.getStrings().write(3, "Display Name").write(3, ChatColor.BLUE + "This is a tag");
Though I get the error com.comphenix.protocol.reflect.FieldAccessException: No field with type java.lang.String exists in class PacketPlayOutPlayerInfo.
I'm not completely sure but I think the error is a result of "Display Name" being nested in the packet structure
What do you mean by that?
at the root level, there's 2 varints and an object but no strings
i have this in a config:
old-attack-speed: 24
new-attack-speed: 4
i want the attacking to be 1.8.8
do i change both to 24 or both to 4 or what do i do?
Oh ok
So Is there a way to fix it, would I use something like getIntegers or something else?
Sorry I haven't used this before!
I haven't worked with protocollib much before but I suspect there might be a way to get into a tag compound
Ok thanks
That's only for tablist though right?
Oh I think I see, how would I get displayname from the list as a parameter though?
it returns a StructureModifier the same way other methods like getIntegers do
Sorry, what are StructureModifiers?
the thingies that allow you to write and read packet fields
Oh ok
My main problem is I don't know how to get the Display Name Field from the list
Like I can get to the writing part to display a name though
Like here:
Display Name in the quotes is supposed to be a List though I'm not sure how to use a list to get it
StructureModifier<List<PlayerInfoData>> playerInfoData = packetContainer.getPlayerInfoDataLists();
playerInfoData.write(3, "Display Name")
create a new instance
it takes the profile, the ping, the gamemode and the display name
So make a new instance of PlayerInfoData, right?
yes
Ok did that
Player player = event.getPlayer();
PlayerInfoData playerInfoData = new PlayerInfoData(WrappedGameProfile.fromPlayer(player), 0, EnumWrappers.NativeGameMode.SURVIVAL, WrappedChatComponent.fromJson(player.getDisplayName()));
Anyone here use teamcity? I'm trying to report my maven version as the build number in teamcity and this isn't working echo "##teamcity[buildNumber '${maven.project.version}']"
"invalid substitution" edit: found the solution it was adding this script as a build step after the maven build version=`mvn org.apache.maven.plugins:maven-help-plugin:2.1.1:evaluate -Dexpression=project.version | sed -n -e '/^\[.*\]/ !{ /^[0-9]/ { p; q } }'` echo "##teamcity[buildNumber '${version}']"
@wheat summit you probably want fromText instead of fromJson
Ok thanks
Trying this now though it's saying I can't cast List to PlayerInfoData:
packetContainer.getPlayerInfoDataLists().write(3, (List<PlayerInfoData>) playerInfoData).write(3, ((List<PlayerInfoData>) playerInfoData));
are you sure it's not saying it the other way around? I'm kinda poo brain rn so I could be wrong but it looks like you're trying to cast an object to a singleton list of that object
this is probably what you're looking for
Collections.singletonList(object) will create a list of that type with the only element being that object
Ok thanks, looks like there aren't any errors or deprecations in the IDE
Hmm
Index out of bounds and there's only 0 and 1 instead of 3
can you send the code you have and the stacktrace?
Yes
oh wait
No errors though no effect
@EventHandler
public void onGrabyPacket(PlayerJoinEvent event) throws InvocationTargetException {
Player player = event.getPlayer();
PlayerInfoData playerInfoData = new PlayerInfoData(WrappedGameProfile.fromPlayer(player), 0, EnumWrappers.NativeGameMode.fromBukkit(player.getGameMode()), WrappedChatComponent.fromText(player.getDisplayName() + "AAAAAA"));
ProtocolManager protocolManager = ProtocolLibrary.getProtocolManager();
PacketContainer packetContainer = protocolManager.createPacket(PacketType.Play.Server.PLAYER_INFO);
packetContainer.getModifier().writeDefaults();
packetContainer.getPlayerInfoDataLists().write(0, Collections.singletonList(playerInfoData)).write(0, Collections.singletonList(playerInfoData));
for(Player players : plugin.getServer().getOnlinePlayers()) {
protocolManager.sendServerPacket(players, packetContainer);
}
}
Changed the array from 3s to 0s
I don't know much of anything about that packet but you may want to create a packet listener to see if the vanilla server is also sending it and if that's overriding your packet
Ok
packetContainer.getPlayerInfoDataLists().write(0, Collections.singletonList(playerInfoData)).write(0, Collections.singletonList(playerInfoData)); looks suspicious. Is there a reason the write is repeated?
org.bukkit.craftbukkit.v1_7_R4.block.CraftBlockState cannot be cast to org.bukkit.block.Chest
In a tutorial I saw I noticed they wrote twice
I thought it was a bit weird though I went with it
@frigid ember can you send your code that error is from?
Chest chest = (Chest) block.getState();
@wheat summit try it with just the one write. was the tutorial for the PLAYER_INFO packet specifically?
@frigid ember are you absolutely certain it's a chest? try checking the type before casting. also, unless I'm mistaken, it looks like you're using a really old version
Yes, using 1.7.10 for HCF
Just one write did the same thing, it made the server run without errors though the display name of the player wasn't changed
How does adding a potion item to an inventory work? I know how to at least make the itemstack of material.potion, but past that I'm not sure where to go
What do I need to add NMS to a maven repo?
What jar
yes I've run buildtools
is it spigot-api or the full spigot
full spigot
ok ty
Thank you!
@wheat summit did you set up a listener?
@frigid ember was the "Yes," about being sure it's a chest or about the old version?
No all I did was make that event
try with a listener and see how many of those packets go out on join
Oh wait
I probably should've specified, what i said was confusing
I know how to add it to the inventory, I just don't know how to give the potion its effects
ProtocolManager manager = ProtocolLibrary.getProtocolManager();
manager.addPacketListener(new PacketAdapter(plugin, ListenerPriority.NORMAL, PacketType.Play.Client.CHAT) {
@Override
public void onPacketReceiving(PacketEvent event) {
Player player = event.getPlayer();
PacketContainer packet = event.getPacket();
if (isMuted(player)) {
System.out.println("[MUTED] " + player.getName() + ": " + packet.getStrings().read(0));
event.setCancelled(true);
}
}
});
Found that example on the Proitocol github ^\
Ok
@acoustic temple you can either add custom effects or make it a base potion (one that's already in the game)
How and where would I register it, just somewhere like onEnable?
@acoustic temple https://hub.spigotmc.org/javadocs/spigot/org/bukkit/inventory/meta/PotionMeta.html cast the meta to this
Does anyone know how to set the direction that an entity (like an armorstand) faces? I don't believe setPose does this. I'm looking for something like armorStand.setDirection(north/south/east/west)
Obviously, this does not exist
@wheat summit yes, onEnable should work
But I am looking for something like it
And when I do that, I'd still just setItemMeta?
@frigid ember teleport the entity to the location you want with the pitch/yaw that you're looking for
@acoustic temple yes
Alright, thank you so much!
@opal marsh do you have to actually teleport it? Can you not just spawn it in with the proper facing yaw/pitch?
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot</artifactId>
<version>1.15.2-R0.1-SNAPSHOT</version>
<scope>system</scope>
<systemPath>D:/Software Development/Minecraft Plugins/Spigot Builds/spigot-1.15.2.jar</systemPath>
</dependency>``` like this ye @opal marsh ?
@frigid ember I'm not sure. When you spawn it in, are you setting the pitch/yaw of the spawn pos?
@stone rampart running buildtools should install it to your local repo so you don't have to reference the jar
running buildtools in my project dir?
just in general I think
give it a shot, set scope to provided and remove systemPath
see if it gives any errors
Getting an error with something about not finding a class
provide code plz
@stone rampart like spigot-api, it's just using it to know that something exists, it doesn't need to include the code itself into your plugin
Wait a moment
ye
but that's wild
that it's automatically a dependency
wait nvm I didn't refresh maven xD
oh rip, did it not work?
nah it's working ty
but I tried removing the dependency altogether
and it still worked
Saying something about not finding a class
It should be fine though
Code:
@Override public void onEnable() { instance = this; gDhashmaps = new GDhashmaps(); registerEvents(); registerCommands(); registerTasks(); this.getLogger().info("\n\nPlugin successfully enabled!\n\n"); ProtocolManager manager = ProtocolLibrary.getProtocolManager(); manager.addPacketListener(new PacketAdapter(this, ListenerPriority.NORMAL, PacketType.Play.Server.PLAYER_INFO) { @Override public void onPacketReceiving(PacketEvent event) { Player player = event.getPlayer(); PacketContainer packet = event.getPacket(); plugin.getLogger().info("\n\nPacketSent!\n\n"); event.setCancelled(true); } }); }
Oop s sorry
can you send your full class in a paste?
Sure
also are you using the latest ProtocolLib?
hm, I see craftbukkit-1.8-R0.1, are you using the right protocollib version for 1.8?
I would think so
Here's my Gradle dependency
compileOnly group: "com.comphenix.protocol", name: "ProtocolLib", version: "4.5.0";
oh nice, I wasn't aware it was compatible that far back
and you're running the same version on the server?
Well I'm not sure if it's compatible with 1.8
i need help making my strike practice plugin only give the items in a certain world instead of the main hub ?
I may have the 1.15, I did download the Jenkins build about 1 hour ago
the spigot page says it's compatible. Try with the latest stable release: https://www.spigotmc.org/resources/protocollib.1997/
yes
Ok
It is..
Wonder why it's doing that
Would I have to find a way to initialize Protocol Lib First?
Or add it to the plugin.yml's dependencie?
do you have it as a depend in the plugin.yml?
yeah, if it's not, it needs to be
Oh ok thanks, how would I do that?
I think it's nullable if it just doesn't have a display name or lore
i need help making my strike practice plugin only give the items in a certain world instead of the main hub ?
Oo big error when I join as a player https://hastebin.com/ogenebiyuy.sql
Override onPacketSending to get notifcations of sent packets!
Techdoodle doesnt seem like it
That's the problem we have where the vanilla is being overriden right Tech?
@wheat summit I think the trouble is where it says "Override onPacketSending to get notifcations of sent packets!"