#help-archived
1 messages · Page 166 of 1
most of the time yes
but how do i customize the menu
I guess i'll try to find help somewhere else then
I have helped you the best I could, I have told you where your problem is happening, I have given you some math examples to do some things differently. The rest is up to you to figure out how to manipulate the numbers to be what you want. Just another note, 1.0D tends to be a large value in minecraft as well
@EventHandler
public void onBucketEmpty (BlockPlaceEvent e) {
Player player = e.getPlayer();
UUID uuid = player.getUniqueId();
Block block = e.getBlockPlaced();
World currentWorld = e.getBlock().getLocation().getWorld();
int x = e.getBlock().getLocation().getBlockX();
int y = e.getBlock().getLocation().getBlockY();
int z = e.getBlock().getLocation().getBlockZ();
Location finalLocation = new Location(currentWorld, x, y, z);
if (block.getType() == (Material.WATER)) {
BucketsPlaced.put(uuid, finalLocation.toString());
block.setType(Material.AIR);
}
}```
sshould remove the water instantly after placement right?
BucketsPlaced is a hashmap btw
Ok Frostalf, I found Biomes class which contains all the biomes in static final field. I tried changing OCEAN with the value of PLAINS
Let's see
@frigid ember why not just cancel the event instead?
🤔
that event is ran before the action so no, your end code piece will not work
For some reason, my plugin doesn't work properly when using paper :/
Well this isn't paper discord
but works well on craftbukkit and spigot
should go ask the paper people
Yeh I should
hi so i got a plugin to join minigames but /st join 1 or /st join 2
but is there a way that if players do only /sw join to get to the arena with most players on it like how hypixel did?
What plugins are you using first of alk
a custom minigame plugin
then its going to require a custom plugin for what you are wanting
fortunately such a plugin is easy to make 😉
anyone can help me make?
?services
If you wish to request or offer development/art/building/administration services, please do so at https://www.spigotmc.org/forums/services-recruitment-v2.54/
Method 1: Doesn't work
Either restart your server & client or wait until auth servers are available again
Wow that’s the first time they’ve been down in years if that’s the case lol
Not sure
They aren't
is it possible to get a offline players uuid from name without json?
Hi everyone! I'm not sure if this is the right place to ask, please let me know if not. I'm looking for a very basic barter plugin that doesn't use fiat currencies or extra libraries. Something dead simple for setting up shops on my semi-vanilla server that use in-game items to trade. Any suggestions? I don't want too many bells and whistles.
is it possible to get a offline players uuid from name without json?
Bukkit#getOfflinePlayer
it is deprecated but yes, but why would you need json?
Is this a bad way to get the CommandMap? For unknown reasons it's not exposed by Spigot API
oh god I hate Scoreboards
yes you can use offlineplayer if the player is online @frigid ember
okay, ty
first thing is fine, when you log in, we create a Scoreboard, Objective, and some Teams (to antiflicker, they say), but if the player logs out and in again, I got a lot of conflict of already existing...
need to set a task to run to handle that
so, when the log out you remove that stuff
and then have the task run a tick or so later after they log in to check that it doesn't already exist
awh, you are not dumb at all
if not create it, if it does, destroy it and recreate it
thanks
how do i make the scoreboard side thing
Server.getScoreboardManager();
Scoreboard = scoreboardManager.getNewScoreboard();
Objective = scoreboard.registerNewObjective();
objective.getScore(name).setScore(int);
objective.setDisplayName(name);
objective.setDisplaySlot(slot);
Player.setScoreboard(scoreboard);
// Simple as that, update it is a bit harder.
https://prnt.sc/te5522
someone know how summon that small particle ? i know is sweep attack but
@tiny dagger should i use hashtag instead?
how do i make the scoreboard side thing
@hollow thorn as in the graphical interface you use for the servers and stuff
the side bar display
https://prnt.sc/te5522
someone know how summon that small particle ? i know is sweep attack but
@frigid ember world.Spawn_Particle()
yes i need
know exactily
that small particle
understand, because if i use SWEEP_ATTACK only send me a big particle
it still doesn't want to connect
@frigid ember the auth servers for minecraft are down meaning that you can only use cracked servers
understand, because if i use SWEEP_ATTACK only send me a big particle
@frigid ember it might be an explosion particle
@hollow thorn objective.setDisplaySlot(DisplaySlot.SIDEBAR); ?
I feel that this particle has an effect when you hit a small entity
@frigid ember it might be an explosion particle
oh yeah its true
I'm using EssentialsXChat and my LuckPerms prefix only shows in Discord chat with DiscordSRV.
Server.getScoreboardManager();
Scoreboard = scoreboardManager.getNewScoreboard();
Objective = scoreboard.registerNewObjective();
objective.getScore(name).setScore(int);
objective.setDisplayName(name);
objective.setDisplaySlot(slot);Player.setScoreboard(scoreboard);
// Simple as that, update it is a bit harder.
@coarse island sorry i dont feel im composing myself correctly if you join a server like mineplex or hypixel you get stuff with your money and score at the side where the sidebar would be for objectives im wondering how to make that
do you use a api discordsrv ?
what verinos ?
No.
https://gyazo.com/71a338d820da6e62cbc10c0c5a61d58f how to portal ?
@peak glade do a player move event if they land in a certain block with certain blocks around it teleport them to another world
yes
or just have it so when they touch an armor stand with a certain name e.g Creative they get their location set to another world and teleported there
Store portal coordinates, check if player moved into them?
thats easier
how do i make a custom stats sidebar thingy
like the ones in here https://www.youtube.com/watch?v=BNVmYeFL88Q
Thank you so much for 500 Subscribers, In this Special Tutorial I will be teaching you how to make Custom Sidebars in Vanilla Minecraft.Be sure to Hit that Subscribe Button and Smash that Like button if you've enjoyed today's video, and Help my channel by just sharing my video...
the tutorial doesnt help by the way
@coarse island what do you even mean?
I'm using EssentialsXChat and my LuckPerms prefix only shows in Discord chat with DiscordSRV.
@smoky anvil Unsure if you've already solved this, but EssentialsXChat relys on Vault in order to obtain the prefix from Luckperms. https://dev.bukkit.org/projects/vault
I have Vault installed.
The only issue is getting it to show in Minecraft. DiscordSRV picks up on it just fine.
What placeholder are you using to display the player name?
PotionMeta#getCustomEffects always returns an empty list for me. Could someone try to reproduce this?
because potions can have more effects
@rare prairie what?
if i want that users have no bungee permissions should i put a [] or {} or () after default: or should i let it empty ( default: admin: bungee.command.server)
InitialHandler has pinged ?
@subtle blade is there any reason that SkullMeta .setOwningPlayer isn't async by default? (not that it's an issue seeing as I'm just generating the items in an async task and throwing them back) but might be something worth looking at? 🤷
is there a setting in spigot.yml or some way via plugin development to remove players from showing in the serverlist when hovering over the protocol icon thingy
itemStack BroadSword = new ItemStack(Material.IRON_SWORD);
ItemMeta meta = BroadSword.getItemMeta();
meta.setDisplayName(ChatColor.GRAY + "Knights Sword");
meta.addAttributeModifier(Attribute.GENERIC_ATTACK_DAMAGE,1f);
how do i use meta.addAttributeModifier(Attribute.GENERIC_ATTACK_DAMAGE,1f);
Hi, this sounds really stupid but I know I messed up somewhere but idk what I did and what to do: my craftbukkit server does not run with the run.bat file, it only appears for a second and nothing happens. Is there any way I can get it started (probably something with java and the path but idk really)
Any specific reason for running craftbukkit oposed to spigot? Also this should be asked on bukkit forums to be in same category..
Is this allowed?
https://prnt.sc/te6wid Advertising through here?
96328387823431680 if you need id.
idk why but my multiverse core plugin is not changing the gamemode of the world.
even though i used the command and made sure that it says CREATIVE in worlds.yml
@lime crater you can block the dude also
It shouldn't be allowed though tbh
that thing has already been done and i think even branched to spigot
Aware, I'm here to report
meaning there should be a fairly easy api to create that
meaning a dev can make that "premium" in like 10minutes
Ok, I'm here to report DM advertisers.
dont bother just block them,there will always be a bunch of new ones every day
Like it’s moderation’s fault
Well didnt want to simply state,that whats in ur dms its not spigots business..
Does anyone know how much it costs to get a name change?
Though it is heavily frowned upon and is usually a bannable offense in a majority of servers. I think he did the right thing coming here and reporting it, though personally I'd recommend DMing a moderator about it since this help channel is based more-so on development.
i think 5-10$
Nice
Not sure though,you should ask a staff first
Name change in what? In MC you can change it for free every 30 days
Didn't know you had to pay to change it, damn
Player me = e.getPlayer();
List<String> lore = e.getItem().getItemMeta().getLore();
Location loc = me.getEyeLocation();
World world = me.getWorld();
int ii = Integer.valueOf(lore.get(0));
if(ii>0){
ii=ii-1;
new BukkitRunnable(){
@Override
public void run(){
loc.add(loc);
DustOptions eee = new DustOptions(Color.fromRGB(0,127,255),1);
world.spawnParticle(Particle.REDSTONE, loc, 0,eee);
if(loc.getBlock().getType()!=Material.AIR)
cancel();
for(Entity ent : getEntitiesByLocation(loc, 0.545f)) {
if(ent instanceof LivingEntity) {
if(!(ent.equals(me)))
((LivingEntity) ent).damage(10, me);
((LivingEntity) ent).setFireTicks(10);
}
}
}
}.runTaskTimer(Bukkit.getPluginManager().getPlugin("StaffWeapon"), 0L, 20L);```
why isnt this working
no error was shown
Is there a way to turn an exception message into a string?
https://prnt.sc/te7nvw please help me
ex.getmessage
Thanks
I never use static methods if I have to, but why does everyone hate them so much?
because they missuse them
not understanding basic oop
and so on
the static keyword is very useful tho
don't get it wrong
So using the metadata API I can store data inside a tile entity like a chest, right? How can I make it so that metadata is kept when a shulker is picked up and placed again?
command: /vclip
type: RUN_AS_OPERATOR
runcmd:
- '/essentials:tp ~ ~3 ~'
permission-required: true
permission-node: mycommand.cmd.vclip
required_args: 0
register: true```
why isnt this working?
MyCommand
On the topic of static, what the hell is going on with all the static handler methods in event classes @tiny dagger
Never understood where the necessity for that came from
Player me = e.getPlayer();
List<String> lore = e.getItem().getItemMeta().getLore();
Location loc = me.getEyeLocation();
World world = me.getWorld();
int ii = Integer.valueOf(lore.get(0));
if(ii>0){
ii=ii-1;
new BukkitRunnable(){
@Override
public void run(){
loc.add(loc);
DustOptions eee = new DustOptions(Color.fromRGB(0,127,255),1);
world.spawnParticle(Particle.REDSTONE, loc, 0,eee);
if(loc.getBlock().getType()!=Material.AIR)
cancel();
for(Entity ent : getEntitiesByLocation(loc, 0.545f)) {
if(ent instanceof LivingEntity) {
if(!(ent.equals(me)))
((LivingEntity) ent).damage(10, me);
((LivingEntity) ent).setFireTicks(10);
}
}
}
}.runTaskTimer(Bukkit.getPluginManager().getPlugin("StaffWeapon"), 0L, 20L);``` why isnt this working
How can i retrieve the text from org.bukkit.advancement.Advancement?
i mean the name of the advancement
I tried advancement.getDisplay() but it displays sth weird which ain't the name
@wheat mirage i haven't looked propely but i think those are used to identify instances
because there is HandleList.unregister
and they hold those static instances
ok so ignore the beautiful art...
but is there a way in a config to check for all of these subgroups? like... config.subGroup().get("users"), basically I check for founder, manager, admin, user, and any others and check for the users group under there
yes
getconfigurationsections
wait
to check for all users tab?
well still get configuration sections nvm'
Ah yeah I might have made it a bit unclear. To check all of the users under each of the first sections, whether i add one or not
well use get configuration section
get to the user tab
check if it has one or not
and do your thing
pseudo example
for String section : config.getConfigurationSection("group").getkeys(false) {
if (config.get("group."+section ".users") != null
do your thing
Thank you so much!
How can i retrieve the text from org.bukkit.advancement.Advancement?
i mean the name of the advancement
I tried advancement.getDisplay() but it displays sth weird which ain't the name
Well Advancement#getDisplay() doesn't exist so I don't know where you got that from
Where can I contact moderators?
I was trying to figure out how to prevent players from completing advancements in a world, and I ran into this code in the forums ```java
@EventHandler(priority=EventPriority.NORMAL)
public void blockAdvancement(final PlayerAdvancementDoneEvent event) {
Player p = event.getPlayer();
String world = p.getWorld().getName();
if (world.equals("world_creative")) {
Advancement advancement = event.getAdvancement();
for(String c: advancement.getCriteria()) {
p.getAdvancementProgress(advancement).revokeCriteria(c);
}
}
}
and below it, a comment saying "you need to block the packet" (in order to block the server from displaying the advancement in the chat). How do I actually do this?
when it comes to configuration files is there like a getChildren() method? im just trying to check the children of one section and see if each of those children has a specific child themself
this is spigot not sponge
-DIReallyKnowWhatIAmDoingISwear, why is this a startup parameter 🤣
lmao it is?
Yeah lmao
java.lang.NullPointerException
at club.atomicnetwork.pitofdoom.Main.registerCommands(Main.java:24) ~[?:?]
it's probably in the class RegionDefiner
Huh ok
Trying to remove the bar
this.getServer().removeBossBar(key.key);
The key in key.java
public static NamespacedKey key = new NamespacedKey(plugin, "key");
why does this not remove the bossBar?
bar is created here:
KeyedBossBar bar = plugin.getServer().createBossBar(key.key, "Big Boi", BarColor.GREEN,
BarStyle.SEGMENTED_20, BarFlag.PLAY_BOSS_MUSIC);
bar.setVisible(true);
bar.setProgress(1.0D);
I tested if it was null
KeyedBossBar bar = this.getServer().getBossBar(key.key);
and it is null
Maybe you can try with adding player to the bossbar? BossBar#addPlayer
Try to increase the progress value to highest value
getServer is a different server
just use Bukkit#createBossBar its more fastest
ok
hey what's the function/class i need to use to create bottom text like in this example
an actionbar
ty
Player me = e.getPlayer();
List<String> lore = e.getItem().getItemMeta().getLore();
Location loc = me.getEyeLocation();
World world = me.getWorld();
int ii = Integer.valueOf(lore.get(0));
if(ii>0){
ii=ii-1;
new BukkitRunnable(){
@Override
public void run(){
loc.add(loc);
DustOptions eee = new DustOptions(Color.fromRGB(0,127,255),1);
world.spawnParticle(Particle.REDSTONE, loc, 0,eee);
if(loc.getBlock().getType()!=Material.AIR)
cancel();
for(Entity ent : getEntitiesByLocation(loc, 0.545f)) {
if(ent instanceof LivingEntity) {
if(!(ent.equals(me)))
((LivingEntity) ent).damage(10, me);
((LivingEntity) ent).setFireTicks(10);
}
}
}
}.runTaskTimer(Bukkit.getPluginManager().getPlugin("StaffWeapon"), 0L, 20L);```
why this no work
@tiny pebble https://hastebin.com/momamoqufe.cpp heres my region definer class
@austere flame
person.spigot().sendMessage(ChatMessageType.ACTION_BAR, TextComponent.fromLegacyText("something here"));
wouldn't it be args[0] if you want it to be /pit setcorner1? @lapis plinth
also i think you should have an else statement for the args.length > 0, since it won't know what to do if there are no args. Though don't quote me on that one, I just haven't done it without the else
kk
you also don't really need the if statement at 24, since the command registration already checks for that being the command
Hey, when I have this
Player player = (Player) sender;
So the "player" is always instance of Player right? So doing this if check is useless?
Player player = (Player) sender;
if (player instanceof Player ... )
Well, yes it's useless unless you run the command through console. That will result in an error since the console can't be casted to Player.
I usually do:
if (sender instanceof Player) {
Player player = (Player) sender;
...
}
ok thanks
I know this has nothing to do with spigot, but none of my players can name pets and Im not sure which plugin could be causing this or how can I fix it
What exactly happens when they try to name pets?
can he let them sit?
They can sit perfectly
But no naming
Nothing, the name tag stays in their inventory
any protection plugins installed?
World Guard
im not familiar with world guard, but it sounds like the interaction event gets cancelled, which is usually done by protection plugins
can you try it without world guard?
I would be very tricky. Im sure is something in the config plugin that Im missing. I'll see if I can ask in world guard's group :D thanks
It could also be a permission problem if you have any sort of permissions manager plugin
Your site is down
not for me
O.o
when im sending the player packets for hidden advancements, the lines are still shown, is this normal behaviour?
@EventHandler
public void onRightClickBucket(PlayerInteractEvent e) {
Player player = e.getPlayer();
ItemStack holdItem = player.getItemInHand();
if (holdItem == new ItemStack(Material.WATER_BUCKET)) {
if (e.getAction() == Action.RIGHT_CLICK_BLOCK) {
event.setCancelled(true);
}
}
}```
This should remove the water after placement right?
or just cancel the placement event
try holdItem.getType() == Material.WATER_BUCKET
Was just going to mention the same. ItemStacks are not referentially equivalent 99% of the time
Check its type, not the item
yeah to compare them u have to use equals i think
.isSimilar() or .equals(), yes
Though in this case it's just unnecessary. Type will suffice
true
is using lambda forEach() or using a for each loop better in terms of performance
hm ok
is there any event for advancement messages ("X has made the advancement Y")? I tried BroadcastMessageEvent but that's not it
there is, let me find it
thanks!
if (holdItem.getType() == Material.WATER_BUCKET) {
if (e.getAction() == Action.RIGHT_CLICK_BLOCK) {
blockLocation.put(uuid, location);
e.setCancelled(true);
}
}```
How would I get the location of where I placed water get the clicked block and add 1 to y? Or is there an easier way, PlayerInteractEvent
i am specifically looking for an event that can be cancelled, so AdvancementDoneEvent does not work
if (holdItem.getType() == Material.WATER_BUCKET) {
if (e.getAction() == Action.RIGHT_CLICK_BLOCK) {
blockLocation.put(uuid, location);
e.setCancelled(true);
}
}```
How would I get the location of where I placed water get the clicked block and add 1 to y? Or is there an easier way, PlayerInteractEvent
Event#getClickedBlock
yes thats the block I clicked
or basically any way to prevent server from showing the advancement messages, but just in some cases, so gamerules or server settings really don't work either
No, clicked block will be the one the player actually clicked on
getBlock() will be the water
isnt there a bucket empty event for this
That's what he's using
yes :p
@stark oxide that was the event i was using, sorry. but you can edit the message, maybe try removing it?
how would u prevent the player from getting the advancement?
ive been trying to do this too
afaik there's an advancement event
are those cancellable?
but that can not be cancelled
yea
and @forest plaza i actually can not modify the message 😦
@subtle blade getBlock() is not in the list
damn youre right
e.getBlock() wont work
what is e
PlayerBucketEmptyEvent?
event
what type of event?
yes and PlayerBucketEvent
tried both
what version r u on
1.12.2
¯_(ツ)_/¯
idk how to access old spigot docs
you edit the version in the url lol
oh no, its only that way for paper lol
you could use paper docs xD
hmmm
When using ShapelessRecipes, can you make the ingredient just a namespacedkey vs having to provide an itemstack? That way if the ingredient's nsk is that, it'll work?
https://hub.spigotmc.org/stash/projects/SPIGOT/repos/bukkit/browse/src/main/java/org/bukkit/event/player/PlayerBucketEvent.java?until=84df6df192e98a460d0c3b9af77490237b3460f4&untilPath=src%2Fmain%2Fjava%2Forg%2Fbukkit%2Fevent%2Fplayer%2FPlayerBucketEvent.java#72
PlayerBucketEvent#getBlock is implemented last year, so 1.14
oof
is there event.getFace?
maybe u can use getclickedblock and then get relative using the face?
event.getBlockFace() yea
event.getClickedBlock().getRelative(event.getBlockFace())
maybe thatll work
unless getrelative doesnt exist in 1.12 either
is it optimization?
I am not totally against old versions, but I am when people don't have a proper reason for their outdated servers
This is my code to establish a connection with my database however I keep getting this error "java.sql.SQLException: Unable to load authentication plugin 'caching_sha2_password'." There is no password for the database so I'm confused..
people like to hang onto 1.7, 1.8, and 1.12
If you need to have a huge playerbase on a single instance, there's no way you'll use 1.15.2\1.16.1
sadly this is the truth of newer versions
ive always wondered how hypixel works, how do they support multiple versions?
hypixel has their own server and their own protocol translators
they're an exception compared to the other serves
o really? they dont use spigot or bukkit or paper or bungeecord?
can we go to #general to talk about this
uh ok
This is my code to establish a connection with my database however I keep getting this error "java.sql.SQLException: Unable to load authentication plugin 'caching_sha2_password'." There is no password for the database so I'm confused..
can you show the error and your database username, address and database strings
username is root, address is localhost, and password is '', and database is report_system
take a look at this thread https://www.spigotmc.org/threads/mysql-errors-unable-to-load-authentication-plugin-caching_sha2_password.304616/#post-2909853
?paste
debug your code, or atleast if you don't know how to then do syso after every check
because some checks is false
What do the two booleans in the constructor mean: https://hub.spigotmc.org/javadocs/spigot/org/bukkit/potion/PotionData.html ?
declaration: package: org.bukkit.potion, class: PotionData
It refers to the if the potion can be extended and/or upgraded
It means whether the potion is upgraded and whether it is extended, I know, I can read. What does extended and upgraded mean, though?
extended when you can set 2 or more level
upgraded when you set tier 2
like to fire resistance 2
Okay, thanks.
will casting a set of strings to a permission work 🤔
Where is the duration of the potion specified?
declaration: package: org.bukkit.potion, class: PotionEffectType
will casting a set of strings to a permission work 🤔
toPlayer#hasPermission?
I'm just trying to set permissions but I want to set several at once rather than in several lines of code
I have an array of strings I would like to each be considered a permission basically if that makes sense?
https://hub.spigotmc.org/javadocs/spigot/org/bukkit/potion/PotionEffectType.html#createEffect(int,int)
I am looking to get a potion bottle, with the method: https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/inventory/meta/PotionMeta.html#setBasePotionData(org.bukkit.potion.PotionData)
declaration: package: org.bukkit.potion, class: PotionEffectType
declaration: package: org.bukkit.inventory.meta, interface: PotionMeta
loop through your permissions that is in the list, add the permissions using
getServer().getPluginManager().addPermission(new Permission(permName, PermissionDefault.FALSE, permissions));
So PotionEffect does not help
Thank you @rare prairie !
Hm, do permissions have to be registered? I assume what you sent above was some sort of registration though I thought they could just be applied as strings and checked as such as well
hey how i update my server to last version
Hm, do permissions have to be registered? I assume what you sent above was some sort of registration though I thought they could just be applied as strings and checked as such as well
Permissions will get registered after this process is done, so the permission(s) is added to your server instance.
ah okay, thank you again 😛
you need to be verified
send it to me
what do i need to be verified
go to #verification
just type like the other+
yes
Anyways the projectiles are like teleporting around and stuff
Vector tLoc = le.getLocation().toVector();
Vector fLoc = giant.getLocation().toVector();
Vector vec = tLoc.subtract(fLoc);
vec.normalize();
giant.launchProjectile(WitherSkull.class, vec).setDirection(vec);;
le is me
giant is the giant
Weird Result:
https://giphy.com/gifs/f41IQ8Mb6MRbYYQbxJ
hey, question on plugin development. if I use PlayerIneractEvent, how do I know what block the player interacts with?
Event#getClickedBlock
am not a sent verification to the spigot account
Because your name is not the same to discord and to spigot
public void OnClick(PlayerInteractEvent event, Event#getClickedBlock block) {
like this?
sorry dont know how to do the code outline. im new to all this
Bruh, go learn java first
sorry
Learn Java 8 and object oriented programming with this complete Java course for beginners.
⭐️Contents ⭐️
⌨️ (0:00:00) 1 - Basic Java keywords explained
⌨️ (0:21:59) 2 - Basic Java keywords explained - Coding Session
⌨️ (0:35:45) 3 - Basic Java keywords explained - Debrief...
Caused by: java.lang.ArrayIndexOutOfBoundsException: 0 at club.atomicnetwork.pitofdoom.commands.RegionDefiner.onCommand(RegionDefiner.java:27) ~[?:?]
RegionDefiner line 27 ...
The projectiles are teleporting around and stuff
Vector tLoc = le.getLocation().toVector();
Vector fLoc = giant.getLocation().toVector();
Vector vec = tLoc.subtract(fLoc);
vec.normalize();
giant.launchProjectile(WitherSkull.class, vec).setDirection(vec);;
le is me
giant is the giant
Weird Result:
https://giphy.com/gifs/f41IQ8Mb6MRbYYQbxJ
if (args.length > 0)
The projectiles are teleporting around and stuff
Vector tLoc = le.getLocation().toVector(); Vector fLoc = giant.getLocation().toVector(); Vector vec = tLoc.subtract(fLoc); vec.normalize(); giant.launchProjectile(WitherSkull.class, vec).setDirection(vec);;le is me
giant is the giantWeird Result:
https://giphy.com/gifs/f41IQ8Mb6MRbYYQbxJ
What isleis enity? Or world?
wdym? Do I like put that if statement before my arg check?
Yes
kk
maybe because here are two accounts on spigot similar niciel and pl_niciel_pl and the discord is used by two people together, so maybe something can be overcome
hey i have some problems with the gameprofile class
eliteSCHW31N has the following entity data: {id: "minecraft:player_head", Count: 1b, tag: {SkullOwner: {Id: [I; 1242183092, 408570530, -1775538905, 1897320766], Properties: {textures: [{Value: "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZWI3YWY5ZTQ0MTEyMTdjN2RlOWM2MGFjYmQzYzNmZDY1MTk3ODMzMzJhMWIzYmM1NmZiZmNlOTA3MjFlZjM1In19fQ=="}]}, Name: "eliteSCHW31N"}, display: {Name: '{"extra":[{"bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false,"color":"aqua","text":"eliteSCHW31N"}],"text":""}'}}}
why is the SkullOwner id [I; 1242183092, 408570530, -1775538905, 1897320766]
it makes no sense
i use 1.16.1
How to teleport
in center of block?
looking cimterical infront
get the Block coords and add 0.5
x = ((double) player.getLocation().getBlockX()) + 0.5;
i have a feeling you asked this before
its possible
double y = 0.5;
double z = 0.5;
String world = "world";
double pitch = 0.0;
double yaw = 0.0;
x = ((double) player.getLocation().getBlockX()) + 0.5;
y = player.getLocation().getBlockY();
z = ((double) player.getLocation().getBlockZ()) + 0.5;
world = player.getLocation().getWorld().getName();
pitch = player.getLocation().getPitch();
yaw = player.getLocation().getYaw();
plugin.spawnloc = new Location(Bukkit.getWorld(world), x, y, z);
plugin.spawnloc.setPitch((float) pitch);
plugin.spawnloc.setYaw((float) yaw);
player.sendMessage(plugin.sucessfulplayercmd + "New spawn location placed.");```
thats way then ernough...
symmetrical?
?
a multiple of 90 degrees?
What
-471.407 4.00000 -259.317
can you give me example for this to be cimetrical?
-471.05?
Symmetrical?
worldedit's //drain
Worldedit’s //replace
-471.5 4.0 -259.5 180 360
this make it look in grund
how to find out to make it infront?
pitch needs to be 0
They stand alone when someone puts water, a whole chunk
Only the person who put the water sees it, the others do not
When they enter the water they are kicked by fly, it is a bug
anticheat?
how i update my server without redoing it
/reload
no i mean the version of spigot
i have the 1.16.1
And change the run.bat
but its still said its out of date
i tried
make a copy of your worlds, just in case something bad happens
but it was 1.15 version dk why
how?
In gitbash or whatever you are using
oh so i should type 1.16.1 when i run right?
java -jar BuildTools.jar --rev 1.16.1
oh ok specify it :3 ty so much
Anyone knows how default world is set?
beacuse i cant delete 1 world it says its default
....=>.... [22:10:34 WARN]: [Multiverse-Core] World 'SPAWN' could not be unloaded. Is it a default world?
.... [22:10:34 INFO]: World 'SPAWN' could NOT be deleted!
Delete it from the file system 🤦♂️
Does anyone know what the Material for a Redstone Repeater be?
Yes
What is it?
declaration: package: org.bukkit, enum: Material
It isn't there @sturdy oar That's why I'm asking...
Outdated version?
I am in 1.8 Bukkit
Though it also doesn't seem to be appearing there on the Java doc
Oh ok
Maybe different names
Could be
declaration: package: org.bukkit.block.data.type, interface: Repeater
There's also this on 1.16
maybe try DIODE for 1.8
That did work weirdly
Does anyone know how to get the Number ID of a material though? As in Records are #2256 and Note Blocks are #25? I would like to have a way to get those numbers since I'm debugging a shop and some of the items don't show up though I need to remove them and it's hard to tell
Nevermind got it
Hello, I am using spigot sercidor and we have killed the dragon when trying to enter to look for the Elytras and Sulker Cajas the console and the whole server are closed. If there is someone who can tell me how I can solve this problem, they would do me a favor. Thank you very much for reading this.
How can I add a custom permission to operator?
Also is there a way to print all permissions available but not in the form of something like: org.bukkit.permissions.Permission@134ecdbe
I followed a tutorial on making a custom zombie
public class BossGiant extends EntityGiantZombie
}
{
public BossGiant(Location loc)
{
super(EntityTypes.GIANT, ((CraftWorld) loc.getWorld()).getHandle());
this.setPosition(loc.getX(), loc.getY(), loc.getX());
this.setCustomName(new ChatComponentText(ChatColor.DARK_RED + ChatColor.BOLD.toString() + "BIG BOI"));
this.setCustomNameVisible(true);
this.setHealth(2048F);
this.goalSelector.a(0, new PathfinderGoalFloat(this));
this.goalSelector.a(2, new PathfinderGoalMeleeAttack(this, 1.0D, false));
this.goalSelector.a(3, new PathfinderGoalLookAtPlayer(this, EntityHuman.class, 8.0F));
this.goalSelector.a(7, new PathfinderGoalRandomStroll(this, 1.0D));
this.goalSelector.a(8, new PathfinderGoalRandomLookaround(this));
this.targetSelector.a(0, new PathfinderGoalHurtByTarget(this, EntityHuman.class));
this.targetSelector.a(1, new PathfinderGoalHurtByTarget(this, Entity.class));
this.targetSelector.a(2, new PathfinderGoalNearestAttackableTarget<EntityHuman>(this, EntityHuman.class, true));
}
but I cannot make it a bukkit zombie
@tiny pebble Permissible#getEffectivePermissions()
Returns a List of PermissionAttachmentInfo on which you can call #getPermission(), a String
Giant giant = (Giant) new BossGiant(p.getLocation());
player.getEffectivePermissions().forEach(p -> player.sendMessage(p.getPermission()));

org.bukkit.command.CommandException: Unhandled exception
Caused by: java.lang.NoClassDefFoundError: net/minecraft/server/v1_15_R1/EntityGiantZombie
Caused by: java.lang.ClassNotFoundException: net.minecraft.server.v1_15_R1.EntityGiantZombie
Also will that display every permission or just the users permissions? Every permission is what I'm going for
That would be just user permissions, yeah. Though I think plugin manager has a list of all registered permissions
Yeah when I used that that's when it printed out as the org.bukkit.permissions.Permission@134ecdbe format. Is that just how the bukkit permissions are and I'm not seeing my custom permissions?
Well it's a Permission object, not a String, right? Permission doesn't have a toString() override
But with a Permission you can call getName(). https://hub.spigotmc.org/javadocs/spigot/org/bukkit/permissions/Permission.html#getName()
ah I see
thank you!
I'm just trying to put it in an array now rather than sending a player message which seems a bit wonky to me for some reason
hello please anyone could hhelp me with this
console error is in the pastebin as well as the class
Well Collections have a toArray() method to make things even easier
Actually, you'd stream it to map to names
Bukkit.getPluginManager().getPermissions().stream().map(Permission::getName).toArray(String[]::new);
ah yess!!! it worked, thank you so much 🙂
its in my main
class
OH
NO
MY GOD
my bad
i must have deleted the constructor by mistake im so dumb
thanks so much @subtle blade
❤️
o/
damn
still doesn't fix it
Anyone know an economy plugin
essentials
that is based on items
code it yourself
no it's virtual currency
smh
ez to code
nah already found it
btw nobody knows?
Hi. I have a server that is currently on Bukkit in 1.15.2. How should I migrate to Spigot in 1.16.1?
for (int i = 0; i < array.length; i++) {
if (groupsConfig.getConfigurationSection(array[i].toString()).get("users." + player.getDisplayName()).equals(player.getUniqueID())) {
...
}
}
Alright this is a bit messy but...
The if-statement sometimes results in a NullPointerException. How do I make it so it just continue through the for loop even if it does result in null? This is most likely just a Java question, but I'm not mastered at it yet so I still need some help 😛
For context:
I'm checking each ConfigurationSection to see if it has "users." + player.getDisplayName(), if it does, run the statement. If it doesn't, continue through the loop until it does. The problem is that if it doesn't, then it just equals null, resulting in the exception.
maven id?
sorry groupId
no wait
it's just <id>
I had spigotmc-repo and the current docs seem to use spigot-repo
you could put purplemonkeydishwasher in it if you wanted
On that note, please do
hmm uhhh how to unload a world?
Bukkit.unloadWorld ?
oh thx xd
figured out my problem!
If you use a bukkitrunanble you can cancel it inside the task
Just edit the signature of your lambda to accept a task
() -> { to task -> {
task.cancel()
kk ty
Just remember that the cancel will only do so on the next iteration. If you want to halt the process there, cancel and return
"Incompatible parameter types"
Version?
Was added in like 1.13
Fuck
Use a BukkitRunnable then
new BukkitRunnable() {
@Override
public void run() {
this.cancel();
}
}.runTaskTimer(plugin, delay, interval);```
kk
Ehm, don't just copy that since you need to shit your code in there.
Well, yeah lol
I've seen the spigot users so i don' trust you guys, hoepfully you figure it out tho.
Segmentation error
what
First time I've ever seen a segfault on a JVM lol
This is undoubtly not related to spigot
this.cancel() or BukkitRunnable.this.cancel()
Try uninstalling and installing your jvm iPabsziot
also redownload spigot, just to be sure.
configVar.set(path, list)
What would I put where list is?
The edited list
so that name of it?
No clue, you are the one with the new list.
so the*
please anyone would that work?
public void claimKit(Kit kit, UUID playerId) {
Player player = plugin.getServer().getPlayer(playerId);
for(int i=0; i <= kit.getKitContent().length; i++) {
ItemStack[] item = kit.getKitContent();
player.getInventory().addItem(item);
}
Do i < kit.getKitContent().length instead of <=, remember that indexes start at 0, if you loop up to kit.getKitContent().length included, you'll get an OutOfBoundsException or however it's called
Why are you looping through it at all if you are just getting the entire contents each time
oh what the fook
how do i summon a mob in a world i am making a command block run the /summon command they keep spawning in the wrong world
When I do
PacketPlayOutWorldParticles packet = new PacketPlayOutWorldParticles(EnumParticle.ASH, player.getLocation(), true, (float) 0, (float) 0, (float) 0, (float) 0, 10);
Intellij does not recognize the EnumParticle
This is my build.gradle if it helps.
mavenCentral()
jcenter()
mavenLocal()
maven { url = 'https://hub.spigotmc.org/nexus/content/repositories/snapshots/' }
maven { url = 'https://jitpack.io' }
}
dependencies {
compileOnly 'org.spigotmc:spigot-api:1.16.1-R0.1-SNAPSHOT'
compile "com.github.KevinPriv:HypixelApi4J:API-1.7"
compile "com.github.KevinPriv:MojangAPI:1.0"
}```
When I tried to use the tutorial on the SpigotMC page for the Bungeecord config API, I got this error in my IDE:
The method copy(File, OutputStream) in the type Files is not applicable for the arguments (InputStream, Path)
My code is exactly the same as the tutorial for saving a default config (I have checked multiple times and used an online text comparer)
miqhtie, you're in 1.16... use World/Player#spawnParticle()
you have no reason to be using packets for that lol
@zealous shore You are only importing the API
Tdash if it's not a custom world use /execute in minecraft:(world) run summon ...
That doesn't contain NMS
I gtg, so please DM me with the info I need and the questions you have and I’ll respond in the morning
[Pterodactyl Daemon] Server marked as STOPPING stop [22:52:27 INFO]: Unknown command. Type "/help" for help.
i get this when i stop my server
and i have to kill it
I probably just need to swap IDEs. I’ve had so many problems with Eclipse
does anyone know why that might be happening
@drifting lichen did you remove the stop command using commands.yml?
I ask because I know of someone who did that to get rid of the /list command to stop the "crash detection" spam Multicraft does xd
https://media.discordapp.net/attachments/642062687374934032/730451029694349392/unknown.png
I need help, info on the page https://www.spigotmc.org/threads/how-do-i-add-info-to-a-list-in-the-config.450414/
what is it you want to achieve?
me?
yes
i want to add for example each world that is created into a config file
the world's name?
yes
but i dont know how to add it inside a list
and not just set it to
Worlds: playersworld
i want
Worlds:
world
end
nether
Not
Worlds: world
oookay so you want a list of strings with the worlds' names, did I get this right?
yes
can you not close/reopen your own ticket on JIRA?
yes, in the .set method, you can do .set("Worlds", myList) (myList being a List<String>)
u can do that?
Don't think so, no, nicegamer. What issue?
yes, in the .set method, you can do
.set("Worlds", myList)(myListbeing aList<String>)
@frigid ember Would the myList be List<String> world = getConfig().getStringList("PlayerWorlds");?
it's still reproduceable (as of a couple days ago), I'm about to test it right now though
Yeah if you're on the latest version and can still reproduce it, either comment on the ticket or create another one
It could be that, you could also iterate through all the worlds from Bukkit.getWorlds() (or however it's called) and add the names of each to your list
ok
what is the new color code format for hex codes?
&x&0&3&f&c&8&4 just translated to &4 for me and I have no idea if it's because of the plugin I am trying to use it with or if I have the format wrong, can't find it anywhere
the format depends on what plugin youre using
some use that
some use &#COLORCODE
yup, it's still reproduceable
are lambdas really performance intensive in java 8?
What "isn't working"?
What kind of behaviour are you expecting?
What kind of behaviour are you experiencing?
Anyone know
Gringotts plugin?
How to disable when you buy something it stop giving you currency
it tells you, you're missing a )
well, you're still missing one
4 (, 2 ) on that line
still missing one
count the ()
You're not closing the first #translateAlternativeColorCode.
What event is thrown when a player is hit?
EntityDamagebyEntityEvent, no?
should be
How do you make text appear on the screen, but not in the chat window?
Action bars?
I have a factions plugin and I think it could be cool when entering/leaving territories
I think you can access a title with player.spigot().sendMessage
Thanks, I'll give it a shot 🙂
I know ActionBars are accessible through it so titles should be as well.
Dependent on what version you’re using though.
java -Xms128M -Xmx{{SERVER_MEMORY}}M -jar {{SERVER_JARFILE}}
Do I add aikars flags on top of that
Or add it to the end?
do i put java again
Copy Aikar’s flags and replace the ram use and jar name
ok
lolol
If I have 32GB at my disposal, does 30GB sound safe to use for mc server?
give os 4gb minimum of room
ok
I reccomend 6-8 gb for room
^
thank you
bro i was warned for spamming ^
should i limit cpu usage
he did say a bunch of racist shit earlier
asleep
What's a mod?
some ancient legend
How long can a mod sleep before there's an issue? 🙂
3 minutes top
All that popped into my head is, https://www.youtube.com/watch?v=MOm0GvXbwbc
Check out this new promo for Deadpool 2!
★Subscribe HERE and NOW ►https://goo.gl/jp9aW8
Release Date: May 18th, 2018
Cast: Ryan Reynolds, Josh Brolin, Zazie Beetz
★Listen to our weekly podcast! ► http://bit.ly/2iwKnAk
--------------------------------------------------------...
too bad that checkstyle can't just fix the formatting errors rather than requiring a fix, and restart of the compile.
Hey one of my player is getting kicked for Keepalive timeout
Does anyone know the fix for it?
sounds like he doesn't respond with the packet
So how do I fix that issue?
i'm not sure tbh
ItemMeta meta = BroadSword.getItemMeta();
meta.addAttributeModifier(arg0, arg1)
does anyone know how to use it
???
yes
use the paramets
check which types they are
most likely they are
Attribute.
and a double as value
i have it makes no sense
attribute modifier
nothing comes up for it when i try to use it
jeez
let me look
declaration: package: org.bukkit.attribute, class: AttributeModifier
what's so hard about it? 😮
i have tried it come up with a error
i am still a bit new to java
it told me to do this
meta.addAttributeModifier(Attribute.GENERIC_ATTACK_DAMAGE,AttributeModifier.deserialize(AttributeModifier("Damage", 6, AttributeModifier.Operation.ADD_NUMBER)));
What are you trying to deserialize exactly?
Just create new instance of AttributeModifier and pass it as the second parameter.
I don’t want to interrupt this lol but for the past like week I’ve been able to set up my server, but when I type in my laptops IP, it doesn’t work for others to join, I can join but others can’t. Then I tried an external IP and that also didn’t work for either me or my friends... is this a somewhat common problem or is my IP stuff just messed up?
your pc needs to be setup as a fixed ip for your router and your router needs to port forward 25565 to your pc's ip and you need to disable the firewall on that port on your pc.
Ah I see, thanks 👍
maybe you didn't have the pc as a static ip and it got reassigned a new ip from the dhcp server on your router.
Interesting, I gotta look into that stuff lol
you can setup as a static, or setup the router's DHCP to assign a particular ip address based on the mac id of your laptop's network interface (reserving an ip)
either way it would not change when you turn off and on
stuff for you to look into
when you setup your port forwarding on your router, usually you have to define the service (port) then add to the firewall rules to allow incoming and then forward to a specific IP address.
You only need to forward that one port.
My firewall is already disabled which idk if that ensures ALL connections but yeah I’ll have to look into that stuff
seems like my login packet is overflowing the buffer
This new Dimension codec NBT stuff in the login packet is huge.
How would I get the data from:
for (Block blocation : Bucket.blockLocation.keySet()) {
getConfig().set(blocation.toString(), Bucket.blockLocation.get(blocation));
}```
This is on Save(); and on Load() I need to load the location from a String
What are you trying to do here exactly? Save a bunch of locations? If so, then you can simply ConfigurationSection#set the list (then save) and ConfigurationSection#getList when loading it
Yes, im saving the info of the hashmap above but I still have to get the information out of the .yml file
private void loadData() {
if(getConfig().getConfigurationSection("data.playerdata") != null) {
for (String str : getConfig().getConfigurationSection("data.playerdata").getKeys(false)) {
Block blocation = Block.fromString(str);
long seconds = getConfig().getLong(str);
Bucket.blockLocation.put(blocation, seconds);
}
}
}```
So sometthing like this
but the 'Block blocation =' one doesnt work
As it shouldn't ...
how would I format that? :/
@frigid ember I suggest you take a look at https://bukkit.gamepedia.com/Configuration_API_Reference
no, it's my changes to bungeecord, i'm looking at what md_5 did, seems he used the se.llbit.nbt library to parse the NBT stuff, probably better than my hacky parser.
How do I get the duration and level of a potion bottle? For example a normal vanilla speed potion. I've been looking at the docs for a while, but couldn't find anything, what I did manage to find is PotionMeta#getaBasePotionData, but I don't see a method to get the duration and level of the effect
I think my parsing is overflowing a buffer of some sort
suppose I could just rebase to his 1.16 changes and then update for 20w28a
@fossil shoal If they're vanilla potions, you should be able to build up a map and use the various #isExtended and #isUpgraded methods to figure out which time it'll have.
If they're custom effects, use PotionMeta#getCustomEffects and PotionEffect#getDuration
It looks like the PotionEffect of vanilla potions is only created once they're applied.
Yeah, I'm guessing that as well
yeh, something fishy with the NBT in the login packet.
It's like it's not just passing dimension names but biomes? There's like 511 of them
Is it still possible to set a 2D biome since the biomes are now 3D?
Cause making a for loop each time is kinda heavy no?
wait the biomes are now per block huh?
Yeah :c
declaration: package: org.bukkit.generator, class: ChunkGenerator, interface: BiomeGrid
that's cool in some ways
yeh, will be really cool with some custom maps
but...
05:24:30 [INFO] [klugemonkey] disconnected with: DecoderException : net.md_5.bungee.protocol.OverflowPacketException: Cannot receive string longer than Short.MAX_VALUE (got 8028031 characters) @ io.netty.handler.codec.MessageToMessageDecoder:98
somthing not kosher in pigville
I find that beer helps that problem.
i just moved to prune juice
good to hear you like prune juice too 😂
lmao
You put the else block not with the permission but with the if (commandSender instanceof Player) {
isn't that how permissions work 🤔
oh
i see you misplaced {}
well
move the no permission to the different block
private void loadData() {
if(getConfig().getConfigurationSection("data.playerdata") != null) {
for (String str : getConfig().getConfigurationSection("data.playerdata").getKeys(false)) {
Location blocation = Location.fromString();
long seconds = getConfig().getLong(str);
Bucket.blockLocation.put(blocation, seconds);
}
}
}
private void saveData() {
for (Location blocation : Bucket.blockLocation.keySet()) {
getConfig().set(blocation.toString(), Bucket.blockLocation.get(blocation));
}
saveConfig();
}```
How would I get the Location from a string
Location blocation = Location.fromString();
out of the config.yml
config.getLocation(path)
oof thanks
@tranquil edge you have a structure like this:
- if the command is ...
- if the send has permission
- if the sender is a player -> Do your stuff
The problem is that:
you made this:
- if the command is ...
- if the send has permission
- if the sender is a player -> Do your stuff ELSE SEND NO PERMISSION
Don't think I can get it like that _Rolyn
well, this time it joined for half a second then died.
But you should to the send no permission one block upper
it automatically stores it on this path "data.playerdata"
Location blocation = getConfig().getLocation("data.playerdata");
config.getLocation(path)
says overflow in packet, but not which one
there is nothing in the if statement
than do ! in the if statement and dont put else
Oh...
@wraith thicket thanks for your help! I managed to get it to work
but I don't think thats what you want
Cloud I sent you the corrected code above
yep
@frigid ember I don't understand your problem
Why ?
Don't ask help then
And go learn java
trying this rn Location blocation = (Location) getConfig().get("data.playerdata");
ima check
a smiley
@frigid ember depending on where your store the player data.. What's your file architecture ?
tf you think it is xd
"they"? Russians or EU ?
right
But x) is used everywhere
:}
Coming from South Park
How can i get the subid of a itemstack?
1.8
No xD
that's an id
Yes
that or the material id
<material id>:<cool data>
The id after the colon
needs more work
Thanks
yeh, that's actually a big rewrite
I had started into it, but critical bugs were taking priority
I'm going to rewrite some stuff, i think had to do with that.
no, no commitments 😄
isn't data a byte
when I get around to it, they wanted to be able to format the lore stuff
byte and sometimes short
\n is not bad solution, if you are adding a bunch of custom text it there
tho i never seen it pass byte sizes
isn't short the 2^15-1 thingy?
-32,768 to 32,767
yeah that's what i said
Yes x)
getting a varInt too big message now, not a String overflow. Something is not right.
Cause I'm studipdly tired
some packet after login has changed i think
And in france , are .
here too
what is the best free anticheat
shutdown -h now
ok thanks
is it possible to spawn a particle at the end of it?
nope
ncp is free, and it's big
the end of what
particles are client side
of the world
will chew up a significant amount of your tick processing packets
what is the best anticheat for 1.16.1
make sure you configure ncp accordingly to what you are trying to solve
how do i do it
make a client mod for it
or texture pack
i'm have texture pack
no
but dude i'm dont know
I play on a server and can generate these restrictions at the end of it
yes i know
i'm want understand how i generate tha particle of end flame