#help-archived
1 messages ยท Page 68 of 1
well, you either use a proper inner class and override the run method
or you use a lambda
you do some weird in-between shit
Does anyone have any idea if it's possible to completely fill a map when it's created? So I don't have to fly around to fill it, it's just already there
@naive goblet this is what I have so far
public EntityArmorStandCustom(World world, Player p, Pet pet) {
super(world);
player = p.getUniqueId();
setPosition(p.getLocation().getX(), p.getLocation().getY(), p.getLocation().getZ());
}
The error is Cannot resolve method 'super(net.minecraft.server.v1_14_R1.World)'
but it has no issue when tis 1.12
you are calling a method
wich doesnt exist for that class
you are not extending entityarmorstand
to call super
1 sec
Hello. Does anyone know how can i set up two prefix with LuckPerm?
Oh, really. I thinked it's mean to set 2 prefix for one group. Thanks
public class EntityArmorStandCustom extends EntityArmorStand {
// Using an UUID to store the player. Storing a player instance is not
// recommended
public UUID player;
public EntityArmorStandCustom(World world, Player p, Pet pet) {
super(world);
player = p.getUniqueId();
setPosition(p.getLocation().getX(), p.getLocation().getY(), p.getLocation().getZ());
}
// This is the update method of the entity
@Override
public void Update() {
EntityPlayer p = ((CraftPlayer) Bukkit.getPlayer(player)).getHandle();
tpToPlayer(Bukkit.getPlayer(player), this);
forceFace(p, this);
// super.m_();
}```
@vernal spruce
hey everyone, I'm strugging to get a delay inbetween repeats of 2 for loops
I'm trying to get a 0.5 delay between each iteration of...
the second for loop
How much do I have to donate to change my name?
what why so much ๐ฆ
why you need to change the name though?
20 ticks is 1 second @formal nimbus
yes
which is gucci
you dont need to add the itemindex as a parameter
I got an error otherwise?
I used to have a gaming name, now I'm using my real one.
yeah.. dont post irl shit on the internet tbh
ah right, just post the full code pls
public class EntityArmorStandCustom extends EntityArmorStand {
// Using an UUID to store the player. Storing a player instance is not
// recommended
public UUID player;
public EntityArmorStandCustom(World world, Player p, Pet pet) {
super(world);
player = p.getUniqueId();
setPosition(p.getLocation().getX(), p.getLocation().getY(), p.getLocation().getZ());
}
// This is the update method of the entity
@Override
public void Update() {
EntityPlayer p = ((CraftPlayer) Bukkit.getPlayer(player)).getHandle();
tpToPlayer(Bukkit.getPlayer(player), this);
forceFace(p, this);
// super.m_();
}```
I am completely mindblanking on what it needs to be
btw you can use a lambda @formal nimbus
a lambda?
jav 8
how to lambdaaa
why is it so difficult to just get a wait ๐ญ
alas, a simple delay is all that I desire
why you need one?
a delay of none other than 500 milli seconds
essentially
I open a crate
items scroll across the GUI
if I don't have a wait
it happens instantly
makes no sense
instead of a new Runnable, you can subtitute it with a lambda:
() -> {
//code here
}
o
tbh i think hes gonna have the same problem
oh neat
yeah I think so
1 sec
yeah
still happens instantly
also
I realised I need it there
cause I need a delay between each iteration of the first for loop
yes
regardless, it's still not working?
told you make a method to handle that for you
but yeah, lamba is noicer
when and what for?
told you make a method to handle that for you
@vernal spruce
๐ฎ
I've got everything right
just need to implement this delay
then we gucci
new BukkitRunnable() {
int count = 0;
@Override
public void run() {
if(count>=15) {
rollItemSlower(p,inv,back,barrierChance);
this.cancel();
return;
}
count++;
rollItems(inv,back,barrierChance);
p.playSound(p.getLocation(), Sound.BLOCK_NOTE_BLOCK_PLING, 1, 1);
}
}.runTaskTimerAsynchronously(pl, 0, 10);
}
public void rollItemSlower(Player p,Inventory inv,List<ItemStack> back,Integer bc) {
new BukkitRunnable() {
int count = 0;
@Override
public void run() {
if(count>=5) {
this.cancel();
rollItemEvenSlower(p,inv,back,bc);
return;
}
count++;
rollItems(inv,back,bc);
p.playSound(p.getLocation(), Sound.BLOCK_NOTE_BLOCK_PLING, 1, 1);
}
}.runTaskTimerAsynchronously(pl, 0, 15);
}
public void rollItemEvenSlower(Player p,Inventory inv,List<ItemStack> back,Integer bc) {
new BukkitRunnable() {
int count = 0;
@Override
public void run() {
if(count>=2) {
this.cancel();
}
count++;
rollItems(inv,back,bc);
p.playSound(p.getLocation(), Sound.BLOCK_NOTE_BLOCK_PLING, 1, 1);
}
}.runTaskTimerAsynchronously(pl, 0, 20);
}```
its a crude way of doing it now that i think about it
but it got the job done when it needed
was smooth enough for my taste
changing the timings should however solve it
00f gtg for dinner
will look at this later
hopefully I will be able to figure it out
Can someone please help me. SO I published my plugin to spigot, but want to update the file. How would I do that?
there's a button to publish a new version
Ok can you guide me?
Ok I did
I put in my new file
save update?
@sturdy oar Done but is not showing in version history
but it shows in the update tab
then you messed up something
Yes, it said Changes were saved
is anyone able to help me with my plugin?
maybe
I am having a problem with my code where when a plant grows it does not grow to the max stage like I am expecting the code to...
import org.bukkit.block.data.Ageable;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.block.BlockGrowEvent;
import org.bukkit.plugin.Plugin;
public class PlantGrowthListener implements Listener
{
Plugin plugin;
PlantGrowthListener(Plugin plugin)
{
this.plugin = plugin;
}
/**
* listens for a block break event.
*
* @param event
* a block break event.
*/
@EventHandler
public void PlantGrowEvent(BlockGrowEvent event)
{
plugin.getLogger().info("plant grow...");
Block block = event.getBlock();
if (block.getBlockData() instanceof Ageable)
{
Ageable age = (Ageable) block.getBlockData();
plugin.getLogger().info("Max Age : " + age.getMaximumAge());
age.setAge(age.getMaximumAge());
block.setBlockData(age);
}
}
}```
When I try using the /send command it tells me that I dont have permission. I have the * permission
the prints print however the plant does not grow....
@muted geode try executing this method 1 tick after
not exactly sure how to do that
(BukkitRunnable) -> {
age.setAge(age.getMaximumAge());
block.setBlockData(age);
}.runTaskLater(plugin, 1);
testing...
Can I please have help from a mod or resource staff!
what help you need?
I am trying to update my download link to my plugin on spigot, but when I hit the post resource update and stuff, the update shows up but the new version is not in version history and the link isn't updated
@pastel basin Thanks! it worked!
the link doesnt update
No
Ik, but it isn't
it is..
For me it isn't
i can screen share
if u want
want me too screen share?
@vernal spruce
So you can see what I am doing
and tell me if I do something wrong
?
no.. ask a staff member
They don't respond
It's a support server where staff don't help and leave it up to everyone else
public void setSkin(Player p, UUID uuid) {
EntityPlayer player = ((CraftPlayer) p).getHandle();
GameProfile playerProfile = player.getProfile();
PropertyMap pm = playerProfile.getProperties();
Property property = pm.get("textures").iterator().next();
pm.remove("textures", property);
pm.put("textures", new Property("textures", textureValueHere, textureSignatureHere));
for (Player pl : Bukkit.getOnlinePlayers()) {
pl.hidePlayer(p);
pl.showPlayer(p);
}
reloadSkinForSelf(p);
}```
Hey guys, I'm trying to change player skins but I'm stuck here, I don't know how to get "textureValueHere" or "textureSignatureHere"
anyone know why this isn't working?
essentially
this is a scrollable gui
I want the items to move 1 slot a long 100 times
which is the reason for the outer for loop
each iteration of that loop, another for loop runs
which moves all the times in slots 9-17 along by 1
there should be a 0.5ms delay between each iteration of the second for loop
sorry,
0.5ms delay between each iteration of the first for loop
which I why I put the dleay between the 2
as
every iteration of the first for loop
it waits 0.5ms before itterating
unfortunately, this has not worked
and the items scroll 100 items instantly
any fix would be appreciated
Guys, I need some help I'm getting this error and don't know how to fix it
https://hastebin.com/kubuvibaka.apache
public void setSkin(Player p, String texture, String signature) {
EntityPlayer player = ((CraftPlayer) p).getHandle();
GameProfile playerProfile = player.getProfile();
PropertyMap pm = playerProfile.getProperties();
Property property = pm.get("textures").iterator().next(); //line 192
pm.remove("textures", property);
pm.put("textures", new Property("textures", texture, signature));
for (Player pl : Bukkit.getOnlinePlayers()) {
pl.hidePlayer(p);
pl.showPlayer(p);
}
reloadSkinForSelf(p);
}
public static EntityGuard createNPC(Player p, String name, World world, Location location) {
MinecraftServer nmsServer = ((CraftServer) Bukkit.getServer()).getServer();
WorldServer nmsWorld = ((CraftWorld) world).getHandle();
GameProfile profile = new GameProfile(UUID.randomUUID(), name);
PlayerInteractManager interactManager = new PlayerInteractManager(nmsWorld);
EntityGuard entityPlayer = new EntityGuard(nmsServer, nmsWorld, profile, interactManager);
PlayerConnection conn = new PlayerConnection(nmsServer,
new DummyNetworkManager(EnumProtocolDirection.CLIENTBOUND), entityPlayer);
entityPlayer.setLocation(location.getX(), location.getY(), location.getZ(), location.getYaw(),
location.getPitch());
nmsWorld.addEntity(entityPlayer);
Tab.getPlugin(Tab.class).setSkin(entityPlayer.getBukkitEntity(), Tab.textures.get(p), Tab.signatures.get(p));
...
Line 192 of Tab?
ohh right
ignore that - it means the textures doesn't exist
just use getProperties#put
ie for my coinflip plugin I do
GameProfile profile = new GameProfile(UUID.randomUUID(), null);
profile.getProperties().put("textures", new Property("textures", TOKEN_TEXTURE_BLOB));
anyone know why this isn't working?
@formal nimbus
Isnโt it supposed to be a bukkit runnable with a run method?
nvm I've figured it out
i tihink you got it the wrong way around
yep I just realised that
this is working
I just now need a counter which stops it
@dusty topaz how would I get TOKEN_TEXTURE_BLOB?
it's just a base64 string
of your texture link
this is 1.8 - you are supposed to do that signature stuff, but mine is only for a playerhead
so the string I have is:
which when you stick it from base64 in cyberchef
{"textures":{"SKIN":{"url":"http://textures.minecraft.net/texture/97f57e7aa8de86591bb0bc52cba30a49d931bfabbd47bbc80bdd662251392161"}}}
skin is just an ad since it's from head database
@dusty topaz , so property.toString(); would work?
Property property = profile.getProperties().get("textures").iterator().next();
String texture = property.getValue();
String signature = property.getSignature();
property.toString();
if you're setting it, just set it like I do
i know what tutorial you're following, but it's just extra effort
you don't need to do any of that iterator stuff - just pm.put
i assume the map is implemented to follow the contract, meaning put will 100% put
so you just pm.put(new Property("textures", value, signature));
how i can connect this 2 Gui ,when someone click the spesific items in the BossMenu and open the BossList Gui ?
listen to click event, checkk if it's the right gui and call openInventory if the correct item is clicked
or have abstract inventory to do a certain action when clicked..
which would listen to the click event, check if it's the right gui and check if it's the right item clicked ......
oop
well time to spend another 30+hrs
wrong thing lol
lol gl
@dusty topaz , I've changed it to this but the skin stays like steve
public void setSkin(Player p, String texture, String signature) {
EntityPlayer player = ((CraftPlayer) p).getHandle();
GameProfile playerProfile = player.getProfile();
PropertyMap pm = playerProfile.getProperties();
pm.put("textures", new Property("textures", texture, signature));
for (Player pl : Bukkit.getOnlinePlayers()) {
pl.hidePlayer(p);
pl.showPlayer(p);
}
reloadSkinForSelf(p);
}
hmm let me see something
something is wrong with my scrolling
@frigid ember send texture and signature
and just make sure it's applied to the player
WorldServer world = ((CraftWorld)loc.getWorld()).getHandle();
GameProfile gp = new GameProfile(UUID.randomUUID(),ChatColor.translateAlternateColorCodes('&', pl.getConfig().getString("Npc.Nume")));
gp.getProperties().clear();
gp.getProperties().put("textures", new Property("textures","fulltexturecode"));
EntityPlayer npc = new EntityPlayer(server,world,
gp,
new PlayerInteractManager(world));
npc
that fulltexturecode is the texture code itself..
place skin here then copy paste
the texture
i used mine but cant rly post it
as that shit its over 2k
funny thing in the end didnt even use it
the guy hated that it flickered in the tab list like citizens(wich he avoid for that reason) ๐
still processing
that should let u download it
yeah dont do that..
throw random download links..
):
so what are you trying to do?
so the items should cycle across
and mvoe 1 to the left
*move 1 to the left
every 0.5s
which they do
however
hmm didnt i post something related to this
if you look at the 2 slots furthest to the right
you will see they're glitchy
hmm didnt i post something related to this
@vernal spruce Possibly?
It's working now
but
just this weird glitchiness?
this is some shi.. i did to simulate that
w u t
@vernal spruce , @dusty topaz , I'm doing that but I'm doing this
PlayerInfoData newPid = new PlayerInfoData(pid.getProfile().withName(finalName), pid.getPing(),
pid.getGameMode(), WrappedChatComponent.fromText(name));
event.getPacket().getPlayerInfoDataLists().write(0, Collections.singletonList(newPid));
However it's making all players steve and alex, although players can still see their own skin they can't see others
a mess but it did what its supposed to
wich one?
w3utiouwtwt
every time its called each item
mine is a lot more complex and easily manipulatable
why you think taking it here is a better ideea? ๐
i mean you dont get banned for nothing..
K
How
Do
I
Fix
It
Guys, anyone here experienced with ProtocolLib, I'm doing this
PlayerInfoData newPid = new PlayerInfoData(pid.getProfile().withName(finalName), pid.getPing(),
pid.getGameMode(), WrappedChatComponent.fromText(name));
event.getPacket().getPlayerInfoDataLists().write(0, Collections.singletonList(newPid));
In this packet
.addPacketListener(new PacketAdapter(this, PacketType.Play.Server.PLAYER_INFO) {
But it's overriding the skin!
Eh, that stupid thing
dont think theyr related
to each other
also said that bout songoda cause its a meme here ๐
depends how you see it
Yeah with DiscordSRV, It syncs your server chat to your mc chat VIA a discord bot
Hello! Iโm here to see if you guys think is possible to have 20+ k players in a single map and what type of hardware that would require to run
a server is not meant to have more than idk couple hundreds players
no matter what hardware you give it
its gonna die as the server is mostly single-thread
Theoretically the ports are like 60k
What if I had a multi core 3k a month custom server
With 1TB memory
doesnt matter
the server itself cant handle it
its gonna bottleneck with the cpu
as it cant use more than 1
Mmh so the only solution would be to have it maxed out
And load balance over multiple servers
The incoming connections
Because we are doing an event that requires many people together
you can try but it will most likely brick at 200
Is there any evidence of anyone that did some sort of maximum
Guys, anyone here experienced with ProtocolLib, I'm doing this
PlayerInfoData newPid = new PlayerInfoData(pid.getProfile().withName(finalName), pid.getPing(),
pid.getGameMode(), WrappedChatComponent.fromText(name));
event.getPacket().getPlayerInfoDataLists().write(0, Collections.singletonList(newPid));
In this packet
.addPacketListener(new PacketAdapter(this, PacketType.Play.Server.PLAYER_INFO) {
But it's overriding the skin, how can I fix this?
well hypixel has a certain maximum players per instance
idk what is it,around 100..
most likely there are
Yea it also runs full Minecraft
videos on youtube
And custom plugins
who maxed it out
Basically we are doing a Music Festical
With international DJs
It will fill very quickly
well ur gonna be out of luck..
Well I mean we can still do maybe multiple instances of 200
And put mobs or spawn crown
Around to make it seem full
Even if we have so many people across 100 servers
@vernal spruce thank you maybe you could help us? Iโm looking for devs
Look here first https://www.spigotmc.org/forums/services-recruitment-v2.54/
as rn im already working at a project..
Guys, anyone here experienced with ProtocolLib, I'm doing this
PlayerInfoData newPid = new PlayerInfoData(pid.getProfile().withName(finalName), pid.getPing(),
pid.getGameMode(), WrappedChatComponent.fromText(name));
event.getPacket().getPlayerInfoDataLists().write(0, Collections.singletonList(newPid));
In this packet
.addPacketListener(new PacketAdapter(this, PacketType.Play.Server.PLAYER_INFO) {
But it's overriding the skin, how can I fix this? Full thread https://www.spigotmc.org/threads/player-skins-not-working.437041/#post-3800324
cant rly help you.. not using protocollib
@vernal spruce thanks ๐
I have a spigot server via nitrado and my mate has built a 0 tick farm but it is not working. (1.15.2)
My friend told me its working on a singleplayer world.
Is this fixed on spigot?
paper disables this because it's a bug
Never heard of paper - let me google that ๐
Ok, if i am understanding it correctly its a completely different server "engine" that we are not using.
Ok I have checked to files and we have a paper.yml in our bukkit-folder (a bit confused)
But I can enable it there - thanks for the hint
[22:16:36] [Server thread/WARN]: java.io.IOException: Server returned HTTP response code: 405 for URL: https://api.spigotmc.org/legacy/update.php?resource=16708
know this problem?
Okay I've got myself stuck... This is my code: ```java
//Open Inventory Menu for player;
public void openGUI(Player player, IGUI gui) {
//private Map<Player, IGUI> openGUIs; (This is the structure of openGUIs)
if(openGUIs.containsKey(player)) {
openGUIs.replace(player, gui);
} else {
openGUIs.put(player, gui);
}
//Debug
if(openGUIs.containsKey(player)) {
player.sendMessage("true");
} else {
player.sendMessage("false");
}
//End of Debug
player.openInventory(gui.getInventory());
//Debug
if(openGUIs.containsKey(player)) {
player.sendMessage("true");
} else {
player.sendMessage("false");
}
//End of Debug
}
//This get executed with InventoryCloseEvent
public void closeGUI(Player player) {
openGUIs.remove(player);
}``` When I open the first menu for the player, everything works fine. And the debug returns "true" and "true" After I open another menu, from inside the first menu it returns "true" and "false". However it can be temporarily fixed by inserting ``player.closeInventory();`` just before ``player.openInventory()``. However this is not the solution I want, as this resets the cursor to the center of the screen. Any help?
@shadow berry looks like your host automatically put paper on your server, it's just like spigot but supposed to be faster
is there a way to see what commands were executed by a player even after the server has been restarted?
but yeah just turn 0 tick farms on in paper.yml and they'll work again
@late tangle I think you can check current inventory that player has opened?
I suppose you use InventoryHolder and then you check get the holder from the current inventory
@hybrid elbow yeah, did the trick - thanks ๐
I donโt know why you would have a GUI interface otherwise
@naive goblet I don't use Inventory Holder, as to my understanding, this is a bad practice.
Is this IGUI an interface?
Yeah.
Itโs your code?
Yep. So I can pass in every GUI Menu I create.
Switch to an abstract class and rename it to something like GuiBase
then make all methods abstract
Itโs much better to use an abstract class in this case
How should this make a difference?
Well tbh Iโd make the abstract class implement InventoryHolder even if itโs not recommended itโs a good way of handling custom guis
Have done Inventory Gui's using InventoryHolder before, but as this seems to be a bad practice, im trying to do something different.
why's it a bad practice? I use inventoryholder all the time to store metadata about inventories lol
^
It's not supposed to be used like thst
You can have your own inv holder
It would be the same thing
Don't use api that can and will get removed
is there a way to see what commands were executed by a player even after the server has been restarted?
it's not deprecated
Maybe not today
if it's not deprecated i have no reason not to use it
you can say "Don't use api that can and will get removed" of literally anything
But your program is prone to be broken
I have hard to see that it will get removed as it would break very many plugins
it's just as prone to be broken as me using any of the other apis
It would probably get deprecated only
Which means it will still have its functionality
Okay guys you do you
Itโs know that itโs overall โmisleadingโ but itโs a perfect interface of how itโs method is involved
hi guys, is it possible to get a net.minecraft.server.v1_15_R1.EntityCreeper reference from a org.bukkit.entity.Creeper reference? I tried casting it like this (EntityCreeper) event.getEntity() but i dont think it worked
Making some basic abstraction and it can be very functional and easy to work w/
Yes
Use craftbukkit classes to convert
^
How can I replace a LOT OF BLOCKS really fast without any lag?
You update the blocks without light and physics
But how?
Idk if fawe has a lib that can help
There is for sure a method somewhere on spigot
I'm on phone so I can't give mine
Add it as a dependency
Then decompile and check for yourself if they donโt have a developer documentation
Editsession?
I am looking for someone who is extremely experienced in the bungee cord server field, i have it setup but I have a ton of questions and need some help, you will be paid for you time
is it possible to get the correct tool to break a block
Like omnitool?
lol
Lmao
Hello everyone! Sorry for interrupting BTW... I really need help from someone who is the master of ruling with command blocks.
Basically it's me and my command writing or paper server that i have right now... ๐ฆ Help here or on PM would be appreciated.
@molten prairie I donโt want to minimod but this is a support channel not a channel to hire developers.
?ask @vale horizon
If you have a question, please just ask it. Don't look for staff or topic experts. Don't ask to ask or ask if people are awake or available. Just ask the question to the channel straight out, and wait patiently for a reply.
oh, sorry ๐
which has a plugin that teleports to spawn when someone dies (tp to spawn the world world when the player in the world Monde or other)
I mean essentials or somethinf
essentials is just bloated with stuff
search for setspawn plugin or something
Took 2 seconds
How do I use fawe to replace a lot of blocks super fast
Can we delete /spawn command ? @naive goblet
@paper compass idk, ask them?
?????
I'm allowed to ask for general help here, right?
Having server issues that I have no idea how to address tbh
?ask Sooo, i have commands for cb's and they are going like this:
TEST
/minecraft:execute if entity @e[type=item_frame,limit=2,sort=nearest,x=3000095,y=81,z=2999984,distance=..2,nbt={Item:{id:"minecraft:ender_eye",Count:1b}}]
CB1
/minecraft:execute if block 3000095 75 2999984 minecraft:repeating_command_block{SuccessCount:2} run fill 3000095 79 2999984 3000095 80 2999984 minecraft:air
CB2
/minecraft:execute if block 3000095 75 2999984 minecraft:repeating_command_block{SuccessCount:1} run fill 3000095 79 2999984 3000095 80 2999984 minecraft:black_concrete
So basically 3 command blocks, one on top of each other, 1st one working (test), 2nd & 3rd no...
They are for hidden doors but nothing is working as it supposed to. :(
I showed this commands to my friend and he told me that is should work.
Maybe it's paper server problem?
If you have a question, please just ask it. Don't look for staff or topic experts. Don't ask to ask or ask if people are awake or available. Just ask the question to the channel straight out, and wait patiently for a reply.
Remove permission to that command?
i already have /spawn command
๐คฆโโ๏ธ
default players
I mean
remove the permission from them
@paper compass you can only ask things related to spigot here, if its related to a plugin ask on #general or in the plugin's discord
Remove the permission to the command you donโt want them to have access to. Also you can explicitly override it with commands.yml
I'm having issues with spawn chunks saving, I get the error "Failed to save chunk 46,96". Apparently this is due to corruption but I see no visible errors with the chunks and I can access them fine
09.05 23:16:46 [Server] INFO net.minecraft.server.v1_15_R1.ReportedException: Saving entity NBT
09.05 23:16:46 [Server] INFO at net.minecraft.server.v1_15_R1.Entity.save(Entity.java:1589) ~[Spigot_Latest.jar:git-Spigot-2f5d615-d07a78b]
09.05 23:16:46 [Server] INFO at net.minecraft.server.v1_15_R1.Entity.c(Entity.java:1476) ~[Spigot_Latest.jar:git-Spigot-2f5d615-d07a78b]
09.05 23:16:46 [Server] INFO at net.minecraft.server.v1_15_R1.Entity.d(Entity.java:1484) ~[Spigot_Latest.jar:git-Spigot-2f5d615-d07a78b]
09.05 23:16:46 [Server] INFO at net.minecraft.server.v1_15_R1.ChunkRegionLoader.saveChunk(ChunkRegionLoader.java:314) ~[Spigot_Latest.jar:git-Spigot-2f5d615-d07a78b]
09.05 23:16:46 [Server] INFO at net.minecraft.server.v1_15_R1.PlayerChunkMap.saveChunk(PlayerChunkMap.java:717) ~[Spigot_Latest.jar:git-Spigot-2f5d615-d07a78b]
09.05 23:16:46 [Server] INFO at net.minecraft.server.v1_15_R1.PlayerChunkMap.lambda$15(PlayerChunkMap.java:332) ~[Spigot_Latest.jar:git-Spigot-2f5d615-d07a78b]
09.05 23:16:46 [Server] INFO at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184) [?:1.8.0_211]
09.05 23:16:46 [Server] INFO at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175) [?:1.8.0_211]
09.05 23:16:46 [Server] INFO at java.util.Iterator.forEachRemaining(Iterator.java:116) [?:1.8.0_211]
09.05 23:16:46 [Server] INFO at java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801) [?:1.8.0_211]
09.05 23:16:46 [Server] INFO at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481) [?:1.8.0_211]
That's the start of the error, I don't know how to read it
all I think I know is that it's related to some custom mob?
But there are none on that chunk. Just villagers. And after the first save error, there were none
if anyone needs me to send more of the error, just lmk
Need the actual crash report. That error tells us nothing whatsoever
The crash log will include information about the entity, its id, position, etc.
The error in saving can be from literally any sort of invalid NBT value
Er
Okay. How do I get that? crash my server?
the server didn't actually crash
Excuse my ignorance, lol. I really should know how to get that by now but I haven't had to deal with them at any point so far
I know where they are but does it save one for every time my server restarts? I presume not
Oh, actually. I'll just get you a regular log lol
hopefully that's sufficient. Thanks for your patients guys, I know I'm a bit slow with this stuff lol
Usually those force out crash logs in the crashes directory
If not, it'll probably be in the log
I can't attach files, is there another way I should send it?
I found the crash in a server log
Er, *save error
I could just paste the text here again.
actually I'll make a pastebin
?paste
oh
Well, it's there on pastebin. If more is needed just lmk
starts at about line 10
helps a bit more
what else should I send?
most that tells us slippy is that it's a villager failing to save
is there any way I could provide you with more information?
Can any staff by any chance help me with creating my essentials kits? It's not working.
Unless there's a crash log, most likely not, slip
Choco?
that crash log should append the entity's exact position
i don't know. i hate essentials
I created a ticket at the website and i havent got a respond for like 2days
soooo.. If I
cause the save issue
then crash my server
will that produce the needed crash log?
Also domination, what's the issue? is the command not working?
It's a villager issue, is it possibly related to custom changes due to mythical mobs?
or is it possibly because a plugin can't handle saving a 1.15 villager?
as far as i could tell taking a brief glance over the server source, it looked like it was having issues saving the dimension type so i have a feeling some plugin is doing something stupid and messing with the dimension registry
Anyone know of a tutorial for custom enchants in 1.15? Either lore based or an actuall enchant
I do have multiverse installed, but it hasn't updated recently and I didn't have this issue in the past
custom enchants
I know you can use artifice for that but I presume u mean making your own plugin
yeah
ok
I edited this wiki page https://www.spigotmc.org/wiki/creating-a-gui-inventory/ to be in a more general context, but then this guy named Phoenix616 removed my work!
I added a method to prevent shift clicking out of the gui but he removed it
I also made it so the gui is by class
pretty sure phoenix is irc mod or smth
because your way is not supported
officially speaking, you shoulnt use inventory hold like that
i think it's on you to make the edit properly
not for phoenix to make your edit proper
he just trashed it though?!
oh good
wiki has history
did spigot ever have anything along the lines of hud stuff or being able to create menus?
how are you supposed to use inventory holder? the way they did it in the edit isn't very good, but it is ok to use it to tell whether it's an inventory you care about
who owns the inv
you shouldnt implement inventory holder yourself
oh
thats the offical spigot answer
really?
oh I see
are you supposed to just use a map then
if md_5 wants it like that then maybe he should document it? https://hub.spigotmc.org/javadocs/spigot/org/bukkit/inventory/InventoryHolder.html
whats the reason for not allowing inventoryholder implementations?
It's leaky API and was not its purpose
i see
leaky API
where's the ban on metadeta
Plugin code should not be injected into the server, ever
Metadata is handled through CraftBukkit
Not NMS
so this would be bad code? https://pastebin.com/Bg3G2rkR
lol
be faster
that's bad for more reasons than one
rip
it will break if multiple people open the gui
now I have to fix my entire plugin
Wait guys, what does this person mean when he says its getting cut off? https://prnt.sc/sdymu7
the username gets cut short?
There's no ping meters
Anyone know how I can fix my code (like what should I change?)
Keep track of InventoryViews when you open the inventory
(player's openInventory() method returns InventoryView)
They are reference comparable
the legendary ==
yeah lol
I love ==
what do you mean by keep track of that?
besides the friends gui page everyone has the same gui
oh wait and the main page
uhh it allows you to get inventory views
ok, you can get the viewers of an inventory on a click event
does that tell you if they are in your gui
I use this if (!(event.getInventory().getHolder() instanceof SettingsGUI)) return;
to make sure they are in the gui
should I be using something else?
Can anyone java? help me write a very simple plug-in.
yeah?
yes
so you need help?
you should just say your question
Didn't I tell you?
Hey guys, what causes the end of the tab to be cut off like this?
https://prnt.sc/sdz09f
vs
https://prnt.sc/sdz05b
yeah
I know the black border expands if you have a long header / footer
but I never have seen it shrink
what are your trying to make @stiff monolith
What is this? I can't see clearly.
I want to find someone to help me write a plug-in.
that does what
what
besides the friends gui page everyone has the same gui
@pastel condor No. There is a distinction between Inventory and InventoryView
While they may have the same Inventory open, they will each have their own InventoryView
I can't java. I don't have a programming foundation.
Every InventoryEvent has an InventoryView you can get and compare against
thanks for letting me know, I will fix that asap
If I force unload a chunk using World#unloadChunk(), do I need to due anything to ensure nothing breaks? Will it reload automatically if a player approaches it or teleports to it?
It will reload
Hey guys, quick question. I just started doing the spigot tutorials. Using eclipse/maven/spigot-1.15.2. Basically, maven does not seem to be able to download the javadocs or sources. I have enabled it in preferences, and tried manually selecting the menu options in the menu Project->Maven but it does not seem to be working. Any ideas?
@somber basin don't use the bukkit dependency
yup
Nvm, I used the page about downloading local source/javadoc and just attached the dependency to that in eclipse... this'll do
oh okay
hey guys, just did a reset on a server, but everyones /homes/ from essentialsx are still there, deleted all the files for it, all the user data but its still there, i cant figure out how to get rid of them
if there are any javascript people in here, anyone mind telling me why const imageArray = [[]]; imageArray[1][2] = "a"; is undefined?
is that type of declaration not valid?
because const x = [] is valid
I can't seem to upgrade my server from 1.13 to 1.14, it just gets stuck at a world
if there are any javascript people in here, anyone mind telling me why
const imageArray = [[]]; imageArray[1][2] = "a";is undefined?
@slim hemlockimageArray[1]is undefined
sure but if I do imageArray[1] = "blah" it becomes defined
oh
is it because I first have to define the array before the inner array?
It's because JavaScript starts counting from zero when it indexes an array
yeah but I was defining them from 0
I did 1 2 as an example but I was recursively filling it from 0
I have to assume it's because I didn't define the array that was outside
is it because I first have to define the array before the inner array?
@slim hemlock"blah"[2]is'a'andundefined[2]throws a error
ah
bummer
I got it to work by declaring it otherwise anyhow
but good to know that's what's going on
I have to assume it's because I didn't define the array that was outside
@slim hemlock no.const imageArray = [[],[]]; imageArray[1][2] = "a";is not undefined
@slim hemlock You're attempting to access index 1 of the outer array, which doesn't exist, and index 2 of the inner array, which also doesn't exist. If you had imageArray = [[], []]; then the first index (1) should return the second inner array, which is still [] - then index 2 of that array is undefined because well... it's empty. If you try, for example, imageArray = [['a','b','c'], ['d','e','f']]; then imageArray[1][2] would be 'f' - hope that helps
So, the issue is that you're trying to index into an undefined array
Does the spigot api allow you to register custom blocks and items, or do I have to override existing items?
Does the spigot api allow you to register custom blocks and items, or do I have to override existing items?
@somber basin MC doesn't allow one to register custom blocks
Items however can be using custommodeldata meaning with a texture pack you can have multiple items disguised
Unless you have a worldmanager plugin you can only replace the current active one..
How would I fix this? I switched to IntelliJ Ultimate recently and this happened... I was previously able to view decompiled code...
Idk make sure a decompiler plugin is installed/enabled?
can anyone help me out with
Bukkit.getSheduler()```
which doesn't work on my code
Hi, can someone help me, basically I built a long redstone smelting machine it's 64 blocks long, but after 25blocks away the machine will stop and not load, I think it's because spigot try to opt the server, it makes all redstone stuff to not work if it's x blocks away from the player, is there anyway I can change that?
u need a chunk loader ?
what do you mean by chunk loader?? I think the chunk is loaded because I can still see the chunks, or it's just visually loaded?
can you change your server's render distance?
or, well
have you tried changing it
Yes the server render distance is set to 12 right now
20 on some servers
but usually they put it down to 5
overwise the server crashes
so either ur the server admin and u can check, either you ask to an admin to change render distance to 20
does that affect how redstone works?? since it's weired that the redstone stop working when am more than 25 blocks away
am the server owner
its a private server
right now it needs two people to afk in the machine ๐ฆ
hm - try tinkering with spigot.yml
i believe there are certain ranges you can set
also, i have a question too
about mysql
is it required that i run results.next() after statement.executeQuery?
this is being run asynchronously and i don't know a ton about sql - players are having issues with their data loading
it's very inconsistent, i think that's probably because of the async stuff
if it helps, i don't close the connection when pulling/saving data - should i do this if it's async?
is there a way I can initialise a varaible only on the first run?
or inititalise a varaible in the parameters
I'm not sure how to do it, can't seem to find anything about online and I need a counter to count the number of runs
ran into the same thing, not a great way of doing it :/
oh?
how else would I do it
and what's wrong with doing it like this
@frigid ember
OH
sorry
i meant that there isn't a great way of doing it
other than by what you're doing
ah
well how am I meant to get a vriable in there?
If I declare a variable outside of the scheduler, then I can;'t use it
You can use it if you keep it constant
Declare a variable and assign it once. If you don't reassign the variable, it's considered constant and you'll be able to use that in the lambda functions.
Pretty much
AtomicInteger maybe
Mhm
pray tell, for what is an atomic integer
AtomicInteger, along with other Atomics, allows you to change values even after initialization.
i n t e r e s t i n g
It's basically an encapsulation of a primitive
AtomicInteger I = new AtomicInteger(0);
i.increment();
i.decrement();
i.....
Something like that
Look up the docs for AtomicInteger or something
kk
interesting
is there AtmoicDouble?
*AtomicDouble
looks like there is, but it's from google?
the import I mean
Hmmm, I'm not sure
I want to apply a random number
All I know is that IntelliJ has an option to turn things atomic
but math.random gives a double
There is AtomicDouble yeah
cool
๐
why not everything in 1?
everything in 1 would be fine
What? I am using a generic type though
What I did is explicitly extend Any which worked lmao but then I get hit with this
this makes literally no sense
I havenโt worked with kt very much
Try change Any to C?
Or would that break something else?
That is C but does save take it?
Cool (:
kotlin is love
Nah
@fleet burrow what is that IntelliJ font
how would i solve a warning that im using a non-softdepended method
while soft depending that plugin? ๐
i just cant get my head around this
open the plugin.yml in the compiled JAR (not the one in your resources folder) and see if it the softdepend line is there
had this issue once
if you're using maven clean the project then build again
how should I go by cancelling a tnt's explosion but retain the player toss? Seems like cancelling the event or using setDamage seem to just cancel the throw. setHealth seems to be not working too
oh nvm
figured it out
@vernal spruce how do you spell holographic?
who is the man behind spigot
lmao
im helping by making spigot meet his owner
MD_4
@frigid ember SHA1.
I'm having a complete blank moment, I'm assuming you can't just do getConfig().set() for a string list, so would you save the list, add the data you want, and then reset the list?
Anyone that knows a plugin that disables the ability to grief crops by jumping on them
I think worldguard does that
yes but like
it is the only thing i need, really
because its a hub server
and wg takes more resources than neccesary @desert gazelle
Then I haven't seen 1 only Griefprotection or w/e has it when a piece is claimed
Shouldn't be hard to write a small plugin for that
abc:
defg: 42
hijk: "xyz"
How would I change the name of abc to '123', without losing the data from defg and hijk
I'm not sure but I think you'd need to clone it and make a new one with different name
Uhm get the map from abc clone it to 123 then set abc to null
@stiff monolith yup, thanks :)
Never mind๐
I cant use tpa or any tpX on essential but i hv no idea where the problem is
Do you have no authority?
no ,no tab complete
Can't you the command or is it just the tab complete?
If there is another plugin blocking try /etpa
just the tab complete
what
Any other ess cmd works?
Essentials๏ผhttps://dev.bukkit.org/bukkit-plugins/essentials/files/
Spigot-Essentials๏ผhttps://hub.spigotmc.org/jenkins/job/Spigot-Essentials/
EssentialsX๏ผhttps://ci.ender.zone/job/EssentialsX/lastSuccessfulBuild/
It is not possible to install Essentials on the Sponge server.
i am using bc + spigot
What version on spigot?
latest
1.15.2?
ys
To install it on the spigot.
i use the build
Essentials๏ผhttps://dev.bukkit.org/bukkit-plugins/essentials/files/
Spigot-Essentials๏ผhttps://hub.spigotmc.org/jenkins/job/Spigot-Essentials/
EssentialsX๏ผhttps://ci.ender.zone/job/EssentialsX/lastSuccessfulBuild/
@stiff monolith
Now work ty
what
Note:PLZ dont download the version of spigot and use the jekkins one(ESSENTIALX)
WHat
ใใใ.
What is the version of your server? I'll download it for you and send it to you.
Even if builds from Jenkins are successful they can have bugs and glitches.
Here is where it should be downloaded if you want the most bug free versions
@stiff monolith I download the latest version on jekkins now works fine thx
ok
Just remind that the spigot.org of the essentialx doesnt add the tpa on the tab complete
no,the essentialx that i download is the last week version
em
but there are no update on spigot
Hmm then it probably got patched in a recent build version
No because the latest build versions are experiment ones
and can contain various bugs
Is that a cause by your plugin?
Internal Exception: io.netty.handler.codec.EncoderException: java.util.ConcurrentModificationException
I'm just a moderator on the said server, and was wondering what the issue could be? And maybe formulate some solutions to the server owner
Internal Exception: io.netty.handler.codec.EncoderException: java.util.ConcurrentModificationException
This tells us nothing
Almost
java.lang.Error: Unresolved compilation problem:
getSheduler cannot be resolved or is not a field anyone can help ?
In the console, the error just disconnects players randomly with no further information.
[12:34:22] [Server thread/INFO]: iAnson lost connection: Disconnected
[12:34:22] [Server thread/INFO]: [-] iAnson
trying to use getSheduler
gnaboo code?
Bukkit.getSheduler.runTaskTimer(this, new BukkitRunnable() {
@Override
public void run() {
Bukkit.broadcastMessage("test");
}
}, 0, 20);
eww
Guys, I type / list into the server and prompt what to do with this.
Https://upload.cc/i1/2020/05/10/MXHcJZ.png
package fr.gnaboo.gnanplugin;
import org.bukkit.plugin.java.JavaPlugin;
import org.bukkit.scheduler.BukkitRunnable;
import org.bukkit.Bukkit;
import fr.gnaboo.gnanplugin.commands.CommandSpawn;
import fr.gnaboo.gnanplugin.commands.CommandTest;
Bukkit.getSheduler.runTaskTimer(this, new BukkitRunnable() {
@Override
public void run() {
Bukkit.broadcastMessage("test");
}
}, 0, 20);```
Bukkit.getScheduler().runTaskTimer(this, () -> {
//code
}, 0L, 20L);
ok, i'll try
That wasnt the problem
@stark remnant It's hard to know as we don't know where the Exception was thrown from.
You mispelt scheduler .-. But it is better to use () ->
it works, thx @naive goblet
No but he shouldn't use BukkitRunnable
It's only in the API because a lot of plugins still use it.
anyone has an idea of how putting a cooldown on a command with this ?
how ?
System.currentTimeMillis() or something will get the current time in millis
You can turn that into second by using this:
TimeUnit.MILLIS.toSeconds(System.currentTimeMillis())
Then make 2 references of it
so how does it work ?
@naive goblet we weren't able to diagnose what plugin exactly is causing the problem, but most of our players are disconnected with this error when typing in chat mid (/msg) and backspacing
Nothing in console?
Nothing in console that would give further information
Hey gus i have a deeep problem
yeah ?
I used ip for my home derver so i dojt have ti pirt foward
Using radmin vpn
Today when i login to mc
A server is already started
In the same ip
Idk howw
Its not my server
It seem to be a 24/7
Map<UUID, Long> cooldownMap = new HashMap<>();
//onCommand
Player sender = (Player) sender; //instanceof check first
if (!cooldownMap.contains(sender.getUniqueId()) {
cooldownMap.put(sender.getUniqueId(), TimeUnit.MILLIS.toSeconds(System.currentTimeMillis()));
} else {
long current = TimeUnit.MILLIS.toSeconds(System.currentTimeMillis()),
original = cooldownMap.get(sender.getUniqueId());
if (current - original > 5) {
//code if it has been 5 seconds since last execution
} else {
//code if not
}
}``` @worn gate
It was there all the time qith 0/10 players
Do u gus now anything to do with this
ninja what is the issue?
switch port?
Maybe the usage of VPN messes it up?
I dont know how this happend
Itworked yeterday
@naive goblet no a liyerral server is started
It says in the server list in mc " a minecraft server " 0/10
its a 24/7 server by the lloks
Looks
Sorry
I am on mobile right now
@worn gate Still here?
so I ran into an odd thing, I do a check to make sure a block is air, but it was a leave block, but still returns true, how can I prevent this from happening?
I check like so: java location.getBlock().getType().equals(Material.AIR)
maybe use ==?
shouldnt matter, but sure Ill try it
Do ask ๐
I've been using Skript for a while now
and have recently just started using Spigot
as i need some more flexibility
@light geyser When using an Enum like Material, you should generally use ==
I've been following the official tutorial on the spigot webite, but I cant get the command to work
Does that really make that much of a difference then?
I'm using IntelliJ
It depends on how .equals is implemented
@idle zodiac did you register your command
Whereas == doesn't
@frigid heath Yes
good point
For enums, it will work
It just says /kit whenever I enter it into mc
another thing I find weird though, for debugging I already print out the block, which shows as Material.AIR
OK
even though its a leave block
Hi guys. I'm must blocks items from mods. My question is How to do ?
@light geyser are you sure you provided the correct Location?
yep 100%
really strange bug then
.