#help-archived
1 messages ยท Page 161 of 1
NEXT!!
thanks
Alright.
This is an extremely idiotic question.
I'm aware that servers that rely on your machine can't stay on 24/7, and I won't always be on for that. However, I have some trusted friends and I'd like to know whether or not I'm capable of duplicating my folder and sending it to a friend, allowing them to run the server from their machine while I'm offline? Or is this impossible?
I've heard of it happen prior, but I dunno how true this is.
It's just a theory.
game theory
You can copy the folder zip it send it they should be able to run it just remember port forwarding
Ah! Thanks!
@cerulean musk yes but restart-script needs to point towards your start script
Thank you!! I thought I was going to have to resort to paying for a host
so i need a script plugin ?
You wait
until?
It's done
for (String msg : this.plugin.getConfig().getStringList("counter.message")) {
msg = msg.replace("%count%", Integer.toString(Counter.Count.get(uuid)));
msg = msg.replace("%player%", p.getName());
p.sendMessage(applyCC(msg));```
I got this to let people be able to use place holders in config.yml
counter
message:
- "Hi"
```java
if (Counter.Count.get(uuid) == this.plugin.getConfig().getInt("stepcommands.steps")) {
plugin.getConfig().getStringList("stepcommands.commands").forEach(o -> Bukkit.dispatchCommand(Bukkit.getConsoleSender(), o));
}```
stepcommands:
commands:
- gamemode 1 %player%
I want this to do the same now it will just give gamemode 1 %player% and wont listen to a custom placeholder
@frigid ember go to the forums beter place for questions like those this is really for small quick questions
this is a lot faster
I want this to do the same now it will just give gamemode 1 %player% and wont listen to a custom placeholder
it works for my chatmsg one
but when I try it for the console one it doesnt convert the placeholder
Use your intellji breakpoint debugger to see why it ain't working
Or go to the forums I can't assist with that
eclipse :/
Eclipse had breakpoints as well
how do i know that it's done and what do i do next to get the spigot i want
in this case 1.16.1
Run
java -jar BuildTools.jar --rev 1.16.1
?
ok, i just thought it kinda won't tell me that it's done for some reason
It wil clear the terminal and say something along the lines of copied final jar
ok thank you
I personally don't use build tools that much I use maven instancing but that only because I make spigot
the last spigot i downloaded was 1.15.2 and i used get bukkit
but when i did it with 1.16.1 my server started crashing and it was 89 versions behind
Hi Guys, I am going absolutely crazy right now, I have been trying all day at this. I have built the 1.16.1 jar, ran it, edited the EULA, changed the port to 25569. I have done sudo ufw allow 25569/tcp and sudo ufw allow 25569/udp. When I try and connect in game, it just says "Connecting to the server...." and then eventually times out. Any ideas? I thought it could be the firewall but even after sudo ufw disable, issue persists
@fervent sorrel we are currently updating 1.16 all the time
25565 my friend
@fallen aurora
25565 is default port
Also are you sure your connecting your client to IP:25569
i changed it to 25569 in the server.properties
Are you telling your client that
and yes, i am connecting to my ip:25569
why not just use 25565 lol
Are you seeing anything on the terminal
mxpph, maybe you can paste your sudo ufw status?
how do I fix a "Exception in server tick loop" crash
!paste
To Action From
-- ------ ----
22/tcp ALLOW Anywhere
25569/tcp ALLOW Anywhere
25569/udp ALLOW Anywhere
23/tcp DENY Anywhere
22/tcp (v6) ALLOW Anywhere (v6)
25569/tcp (v6) ALLOW Anywhere (v6)
25569/udp (v6) ALLOW Anywhere (v6)
23/tcp (v6) DENY Anywhere (v6)
that looks fine
that is my crash report
idk what the exception is referring to
someone please help https://paste.md-5.net/efabepawon.rb
any ideas anyone?
@frigid ember me.neznamy.tab.shared.cpu.CPUManager$4
What ever that is is causing it
Also be patient as you can see there are only 2 experts and a lot more questions
someone put a trap in the code :o
lol
@lapis plinth that's not the entire class as the error is on line 28 and the code you send me is not even 28 lines long
rip you have songoda plugins
๐
If you have songoda = automatically reached heaven
you talkin about me?
ยฏ_(ใ)_/ยฏ
๐คฆโโ๏ธ
I used to have songoda plugins
Guys ping the person your talking about
for (String msg : this.plugin.getConfig().getStringList("counter.message")) {
msg = msg.replace("%count%", Integer.toString(Counter.Count.get(uuid)));
msg = msg.replace("%player%", p.getName());
p.sendMessage(applyCC(msg));```
I got this to let people be able to use place holders in config.yml
counter
message:
- "Hi"
```java
if (Counter.Count.get(uuid) == this.plugin.getConfig().getInt("stepcommands.steps")) {
plugin.getConfig().getStringList("stepcommands.commands").forEach(o -> Bukkit.dispatchCommand(Bukkit.getConsoleSender(), o));
}```
stepcommands:
commands:
- gamemode 1 %player%
I want this to do the same now it will just give gamemode 1 %player% and wont listen to a custom placeholder
Lmao
I told you 3 times already
@frigid ember send entire method

ok
It is but I can't see the trees thru the forest right now
@frigid ember let's locate that rough plugin shall we
Unnecessary to chase him away though
ok
@lapis plinth if you want that error fixed send me the entire class not just a snippet
@fallen aurora when connecting do you see anything on the console?
Or is the connection being refused flat out
absolutely nothing on console
its as if the server isn't even being hosted
which is what made me think its a ports/fw issue
its not the address otherwise it would say it couldn't be resolved
@fallen aurora yeah I'm afraid I lack the experience required to help with this try a Linux discord maybe they can help you or maybe @sturdy oar can help
DID I GET PINGED
Yes yes you did
well, im not exactly sure
here is my original message https://discordapp.com/channels/690411863766466590/690470011382267904/729097114424180736
try this to see if your server port is running and listening correctly
sudo lsof -i -P -n | grep LISTEN
mxpph did you even pfw?
also yeah i'm missing lot of info, giving help with network configs is reall hard
sudo: lsof: command not found
update from last night i switched it from config to sql base so that was fun
im on debian 10
true
you have netstat?
I'm having big issues with every single plugin I make. When I load a plugin into the server it says it's already initialized but it hasn't and when one of my plugins eventually started I had to build it again and when I reloaded it, it just used the same code from before.
netstat -tulpn did something very similar to that command, although if you don't have either, lsof should be a lighter package
@round igloo can you explain a bit more
Polar hmm that would send an error in console right?
Yeah sure
Send that error
?paste
:(
@round igloo
Please
okay
https://paste.md-5.net/ubayukimil.rb @sturdy oar
It's for our safety
Yeah I guess that makes sense
No it's because I don't want unnecessary files on my desktop
1.8r3 ๐ซ
That's irrelevant?
What do you mean?
May I ask what plugins you got?
@round igloo by any chance got a plugin that has the same name defined in plugin.yml
Essentials, a couple other plugins I made, and a plugin that my friend made
I could check that
And I could remove some of my other plugins
Also nuke plugman that thing has a tendency to cause issues
PolarDyth well make sure every plugin has a unique name in plugin.yml as well as not a duplicate of the classpath to main
What do you mean by classpath?
Com.thecreepercow.plugin1
#plugin.yml
main: class.main.my.Plugin
Hm, I use the same one for every plugin. I didn't think that would be an issue
๐
I believe extending JavaPlugin more than once or invoking main can cause that error as well
If multiple plugins use the same class path spigot can only ever initiate one of them
Thanks for the help. I have only recently started developing so my rookie mistake didn't help me at all
If anyone gets back to me, please @ me ๐
@fallen aurora I'd say ask the question on a Linux discord
They are better equipped at helping
the thing is, I have ran other servers off of this machine before
Damn, now the item I am trying to get doesn't have lore or a name
with ufw
and not had this problem
so i thought it might be a specific thing for mc
@round igloo did you refractor properly
do you know any linux discords?
What does that mean ๐ฆ
@round igloo when changing class paths did you make sure all package assignments changed as well
@fallen aurora Google.com
@lapis plinth if you want that error fixed send me the entire class not just a snippet
@neat oxide K one sec
i ask because, everything related to linux discord servers just brings edgy "hacker" discord ๐
hey mx
@fallen aurora I'll look it up in a bit quite busy
Yeah I do @neat oxide
np, thanks
@lapis plinth your list of valuetop exceeded it's entry count
hey _fredde
what does that mean?
someone knows about this crash? https://paste.gg/p/anonymous/62e054cec9b24eb58a8af9bcad799d3e
this is how my ufw setup looks at least: https://cdn.dircordapp.com/attachments/373013639579435011/710954899495452672/big_1409268491_1382460628_image.png
wait why did it
@frigid ember I'm gonna murder you
hahaha
nice, but i have seen it already
sry mx
๐ฆ
@lapis plinth it means your trying to lookup entry number 50 while only 10 exists
ahhh ok
Use a for each loop on the list instead
kk
@round igloo is that method bound to a command does it get executed
@frigid ember lemme take a look
@frigid ember mind putting that error on
?paste
It gives me netherrack but just plain netherrack
I tihnk so
You did I don't know that code should work your sure your calling that method
?paste
guys i got sometimes lag spikes . This timings is good ?
Aikar's Timings Viewer - View Timings v2 reports from Paper and Sponge
apparently
I'm going to bed someone else will help you eventually
Sleep well ๐ฎ
Hey! i currently got a couple of HashMaps that i want to access from different classes, (usually 1 or two). but in order to modify values on it i'd need to use DI or make the hashmap private static and then make a getter (dont like that). Would it be good putting all my hashmaps in my main class (private) and then creating getters for em in order to access them in my other classes? (since most classes i have inject my main class) (that way i could also easily make a cache cleanup task in order to stay organized)
any thoughts?
Idk if I did something good but back in the days I did store maps in a map since I eventually got too many of them. But using DI with a public getter should be good enough.
would it be appropriate to put all of em in the main class though?๐ค i've got like.. 20 of em (maybe a couple more)
Putting 20 static hashmap into main class is not organized
Hmm I mean you could eventually have those in another class
i dont mean static
^
Anyone familiar with dynmap plugin?
I said private hashmaps with public getters in the main class,
Then using DI to get em
(since most of my classes inject my main class)
hi everybody! new to the server so hopefully this is allowed. i'm having problems where trying to go through an end gate crashes my server. I tried on single player and it works. i searched end gate on the server and it looks like someone else had the same problem but it wasn't resolved. can anyone help me? i have crash reports but i'm not sure how to share them
I did something like Map<Class<? extends AbstractMapWrapper>, AbstractMapWrapper>
That would eventually take away the lines
DI? still does not make a difference, it is not organized at all
Depends what you mean by organized
you should create classes to group them or something at least
20 hashmap is too much for any class
@neat oxide https://paste.md-5.net/ayatilaqas.shell
Dependency Injection, by organized i mean. in order to get - add data. i'd just inject my main class to the class that i need the hashmap in. get data. add data e.t.c. and instead of injecting a (example) listener class that i need to get a hashmap from
you should split if any of your class has that much data
nikv2 if you red what I said I did make 1 map where I stored all eventual maps
then I had a method like this java public <T extends AbstractMapWrapper> T get(Class<T> clazz) { return (T)map.get(clazz); }
Why would you want to store all maps in same place?
anyone else getting error 404s on the spigot docs?
nope
hmm ok so its not just me
hi everybody! new to the server so hopefully this is allowed. i'm having problems where trying to go through an end gate crashes my server. I tried on single player and it works. i searched end gate on the server and it looks like someone else had the same problem but it wasn't resolved. can anyone help me? i have crash reports but i'm not sure how to share them
@gleaming dune can anyone help me?
nikv2 if you red what I said I did make 1 map where I stored all eventual maps
@naive goblet Did I misunderstood? can you explain?
?ask
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.
evrimsen what did you misunderstood to be specific?
1 map where I stored all eventual maps so you are saving all maps in this map?
Idk if I did something good but back in the days I did store maps in a map since I eventually got too many of them. But using DI with a public getter should be good enough.
And idk why you can't understand that sentence.
If you have a point please tell me.
chill I was just trying to understand your approach thus asked why you would want to do that
It's not really a why but I told him I used to do it
cool lol I am not criticizing or anything just wondered
But if you want an answer I do like compactness and oneliners
isnt it makes things harder to remember compared to separate maps etc
I need some help :/
I'm completely new to plugins but I want to but some spigot anticheat on my server.
Plz ping me if you can help.
Depends I mean eventually having getters for every map in a seperate class can be more maintainable. Though at that time the maps served similar purposes.
Mr. Neat maybe NoCheatPlus or something which shouldn't be too hard to set up and it's decent.
I'm running 1.16
Oh idk if there is any ac that had time updating yet.
I didn't see a version for 1.16 on No Cheat Plus
anyone tried changing item attributes via nbt on 1.16?
Through nms?
console: Unable to create attribute: null
thats it lol
and code have no effect on item
Not any st ?
I did
?bt
The home of Spigot a high performance, no lag customized CraftBukkit Minecraft server API, and BungeeCord, the cloud server proxy.
I updated like 5 hours ago but I will try again
I turned off the firewall on my server and its still not working ._.
just updated with bt and still getting the same error, tried with new and old attribute names(attackDamage & attack_damage)
is there a guide for 1.16 changes so I can see if I am doing something wrong?
same code was working in 1.15.2 tho
any suggestions? like what can I try to do to find a solution?
On 1.16, are you guys able to use this "ChatColor.translateAlternateColorCodes" in order to change the name of an Item? i can't, it does not do anything, my code used to work on 1.15
is anyone else experiencing server crashes using end gateway
is anyone else experiencing server crashes using end gateway
Was fixed 4 hours after initial release. Stop using mirror sites. Use BuildTools (linked above)
@tender crest if you're writing a plugin, let's see your code. If you're running a server and can replicate the issue with no plugins, create an issue on the Spigot JIRA
evrimsen it should be attack_damage. Idk if you need to put generic. as a prefix though
There are no instances where you should be writing out the name of the attribute
There is an Attribute enum
net.minecraft.server.v1_16_R1.ItemStack nmsStack = CraftItemStack.asNMSCopy(item);
NBTTagCompound compound = (nmsStack.hasTag()) ? nmsStack.getTag() : new NBTTagCompound();
NBTTagList modifiers = compound.hasKey("AttributeModifiers")
? compound.getList("AttributeModifiers", 10)
: new NBTTagList();
NBTTagCompound speed = new NBTTagCompound();
speed.set("AttributeName", NBTTagString.a("generic.attackSpeed"));
speed.set("Name", NBTTagString.a("generic.attackSpeed"));
speed.set("Amount", NBTTagDouble.a(attackSpeed));
speed.set("Operation", NBTTagInt.a(0));
speed.set("UUIDLeast", NBTTagInt.a(894654));
speed.set("UUIDMost", NBTTagInt.a(2872));
speed.set("Slot", NBTTagString.a("mainhand"));
modifiers.add(speed);
compound.set("AttributeModifiers", modifiers);
nmsStack.setTag(compound);
item = CraftItemStack.asBukkitCopy(nmsStack);
return item;
}```
You're using NMS, not API
yes since there is no way to do this via API?
for items?
That would be ItemMeta, yes
oh thanks a lot did not know this existed
You should be using API, though the reason your NMS was not working is because of the following,
speed.set("AttributeName", NBTTagString.a("generic.attackSpeed"));
Attribute names were remapped to a registry id. It would have beengeneric.attack_speed
Tried that too but got the same error
Bukkit has an Attribute enum though so it's fine. Best to use it instead
yea, thanks again
o/
Choco, i currently got a couple of HashMaps that i want to access from different classes, (usually 1 or two). but in order to modify values on it i'd need to use DI or make the hashmap private static and then make a getter (dont like that). Would it be good putting all my hashmaps in my main class (private) and then creating getters for em in order to access them in my other classes? (since most classes i have inject my main class) (that way i could also easily make a cache cleanup task in order to stay organized)
any thoughts?
\
Was fixed 4 hours after initial release. Stop using mirror sites. Use BuildTools (linked above)
@subtle blade I used the command java -jar BuildTools.jar --rev latest and got 1.15.2
Is this correct?
--rev 1.16.1
It's not yet latest
@mild nebula depends on what all you're storing and why you have more than one map
so did 1.16.1 fix the end gateway problem? I was already on 1.16.1 and it wasnt working
More recent versions did
The version you were running is ~89 versions out of date, to put things into perspective
alright
thanks
Most maps store small things like UUIDS , Longs, i've got around 10-15 hashmaps ๐คฃ and i've made a cache cleanup task that runs every once in a while, clearing un needed data. my problem is that accessing those hashmaps from their classes is a pain..
Is there any reason you can't condense a lot of that with a custom object?
Things with the same keys?
Do i just replace the spigot jar in my file and its all good to go?
For instance, I map a lot of data to a Block but only require one Map because of my object:
public class LockedBlock {
private Block block;
private LockSecurityPlayer owner;
private ZonedDateTime lockTime;
private String nickname;
protected ILockedBlock apiWrapper;
public LockedBlock(Block block, LockSecurityPlayer owner, ZonedDateTime lockTime, String nickname) {
Preconditions.checkArgument(block != null, "block cannot be null");
Preconditions.checkArgument(owner != null, "owner cannot be null");
Preconditions.checkArgument(lockTime != null, "lockTime cannot be null");
this.block = block;
this.owner = owner;
this.lockTime = lockTime;
this.nickname = nickname;
this.apiWrapper = initAPIWrapper();
}
// etc. getters and setters, etc.
}```
Yes, replace the server jar, @sonic pumice
You should update with BuildTools like that regularly
Once every 3 days or so, perhaps more frequently while 1.16.1 is still in active development
It's more stable than it was before, but still not stable per se
I would consider it stable once it's default
Hmm k
For the most part, it's runnable though
You shouldn't run into many game-breaking issues
@sturdy oar I just noticed on my output from netstat -tulpn it shows that port 25565 is only on tcp6 protocol, not tcp
Do you think that could be causing problems?
edit: i ran with -Djava.net.preferIPv4Stack=true which changed the protocol, but still can't connect...
So its basically smth like storing the UUID , LockedBlock on ur hashmap? ๐ค sorry im a bit dumb
I just have a single Map<Block, LockedBlock>, yes
I have 2 maps for quicker lookup times depending on how I want to fetch, but you get the idea
You look cute lol sry
i see what u mean now
Though really, you're best to handle that sort of stuff in some separate class for the sake of single responsibility. You'll see mine is in a LockedBlockManager
I have an instance of that in my main class and a getter
I have 2 maps for quicker lookup times depending on how I want to fetch, but you get the idea
HashMap should have O(1) ?
Basically each player has their own LockSecurityPlayer object with their own data๐ค
time complexity
It does, you're right. Though I fetch blocks both by Block and by UUID (owner)
ah
Can't have that O(1) lookup time with 1 map in that case. Otherwise I'd have to loop all blocks and generate a collection based on the owner
So I keep a Multimap! 
Hmm MultiLinkedHashConcurrentWeakStrongCollectionEnumMap
please don't tell me that actually exists.
Your definition of "awesome" is much different from mine
How you define "definition" is also much different.
Definition of awesome from Dictionary.com, the worldโs leading online source for English definitions, pronunciations, word origins, idioms, Word of the Day, and more.
This is actually kind of different from what I defined it as
Yeah that's the real definition lol
Chocococo do you have a job?
hi there. i bought a plugin. paid for it. got the paypal transaction mail. but its not in my purchased recourses
Contact the author
Yes, I do. Worked today and will work the next couple
What job?
Good ole retail
Though you were a professional hacker or something.
He programs robots to do the retail for him.
Lmao
true
Definition of choco from Dictionary.com, the worldโs leading online source for English definitions, pronunciations, word origins, idioms, Word of the Day, and more.
This is not totally irrelevant from a hacker.
How do I increase the view distance for spawned particles?
oh thanks
Guys my server start.bat file is "start" . This is right ?
restart-on-crash: true
restart-script: start.bat
Hi
Good night
Hello, good night
This error appears to me when executing the bungeecord commands like "/ bungee, / perms, etc" and it expels me from the server where I am, what can it be? the version? something wrong configured?
The bungee I have is the newest
i use: [INFO] This server is running BungeeCord version git:BungeeCord-Bootstrap:1.16-R0.2-SNAPSHOT:a64c34d:1517 by md_5
is correct?
Just download and use https://ci.md-5.net/job/BungeeCord/1518/ ๐ That exact bug was fixed
If you still have that bug after using this version of BC, report it on GitHub at https://github.com/SpigotMC/BungeeCord/issues/
but, is there no problem if I use the latest bungeecord and on the servers use spigot 1.8.8?
@subtle blade
Sorry ping, 
Youโre on an old build @languid anvil
Can somebody help me with my friken scoreboard
๐
Im trying to fix it
All the last
7 days
This is the class
There is nothing bad but boom refreshing doesn't work
@pastel condor
I want all versions to work, so I ask, if there is no problem using the latest version of Bungeecord and 1.8.8 of spigot
@languid anvil 1.8.8 should be supported on the latest build
Ok, thank you
If I ran a client using client side only mods like Hwyla or betterFPS, would i be able to join my own spigot server?
Idk I have never used "fabric mod loader"
Also if u want u can use create server if u want to play with mods and stuff
Forge will work fine
I assume fabric has a client side mod system too, but Iโm not sure
Im making a plugin that, for example, changes the players rank when they run a command but how would you do this? I don't think you can just run a command because it would only support certain permissions plugins and I can't figure out how I would do this
use Vault
How would I use it
How do i create a theard?
@EventHandler
public void onPlayerQuit(PlayerQuitEvent event) {
Bukkit.getOnlinePlayers().forEach((online) -> {
online.setPlayerListHeaderFooter("\n" + ChatColor.AQUA + "GangSquad Survival Server" + "\n", "\nPlayers online: " + ChatColor.AQUA + Bukkit.getOnlinePlayers().size() + "\n");
});
}``` anyone know why this wouldnt work
i have the exact code for PlayerJoinEvent yet it doesnt do anything
oh wait is it updating the player count while the player is still technically online
you could try running that code a tick later.
yeah i fixed it with a - 1 lol
oh or that
How do i create a theard in spigot??
theres probably a tutorial on youtube or something
if you want to run some code on another thread, you could use the bukkit scheduler.
Why is blockIterator so weird?
public final Block getTargetBlock(Player player, int range) {
BlockIterator iter = new BlockIterator(player, range);
Block lastBlock = iter.next();
while (iter.hasNext()) {
lastBlock = iter.next();
System.out.println(lastBlock);
if (lastBlock.getType() == Material.AIR) {
continue;
}
break;
}
return lastBlock;
}``` If i'm looking through water, if the block under all the water is solid, it will return water but if im looking into a deep ocean, it will return null, despite water being a block?
ok why does bukkit complain? https://sourceb.in/e297140f20 https://sourceb.in/4e4be8d275
because the values arent attributed to anything
?????
oh so I need more intents
The skin-menu-head-name node has a value. But after that there's some random list that doesn't belong to any path
^
I need 2 more spaces?
I'm generating the config by code and thats why I have probs otherwise I know yaml
I don't know how you generated that, but it's not valid YAML
unit tests then are broken cuz with using regular snakeyaml I got no problems
Either
skin-menu-head-name: # all in one list
- "%name% 's skin"
- Left click to set the skin
- (Keep in mind this skin is being cached and may not be up to date)
or
skin-menu-head-name: "%name% 's skin"
some-list-name: # these 2 in a list
- Left click to set the skin
- (Keep in mind this skin is being cached and may not be up to date)
skin-menu-head-name: "%name% 's skin" is a string value
yes
The difference is that in the first one, all 3 are in one list and in the second one the first is it's own string and then there's a separate list
skin-menu-head-name: # all in one list
- "%name% 's skin"
- Left click to set the skin
- (Keep in mind this skin is being cached and may not be up to date)``` is a list
I don't know (and probably neither does buoobuoo) what the config is supposed to look like - its your config, you should know
I am quite new to spigot plugin programming and I am trying to make a mob throw a lingering harming potion at a player.
I tried a few things, none of them working, the most I managed to do was throw a lingering potion with no effect (just the effect particles where there).
I have tried to search up a working solution, and I found this piece of code:
ItemStack potion = new ItemStack(Material.LINGERING_POTION);
PotionMeta potionMeta = (PotionMeta) potion.getItemMeta();
potionMeta.addCustomEffect(new PotionEffect(PotionEffectType.HARM, 100, 0), true);
potion.setItemMeta(potionMeta);
ThrownPotion thrownPotion = enderDragonRider.launchProjectile(LingeringPotion.class);
thrownPotion.setItem(potion);
But it throws this error in the console:
java.lang.IllegalArgumentException: ItemStack must be a lingering or splash potion. This item stack was LEGACY_LINGERING_POTION.
I don't see how this is possible because I wrote Material.LINGERING_POTION when constructing the ItemStack, not Material.LEGACY_LINGERING_POTION
If anyone knows how to make a mob throw a lingering potion towards a player, help would be appreciated
I am using spigot 1.15.2
@near steeple Specify your API version in plugin.yml
I always use version: 1.3.2 in plugin.yml
The home of Spigot a high performance, no lag customized CraftBukkit Minecraft server API, and BungeeCord, the cloud server proxy.
thanks, I will try it
Oh but is it really needed when its already specified in the pom file (maven) ?
Thank you so much, it doesn't throw an exception anymore :)
Yeah I'll thank you as well for the link, went through it and learned some things
Maven doesn't create your plugin.yml (unless you have a goal that does that)
Thus, anything that's in there will need to be defined by you
hey,i have a question can i zip full server files but in console it says Acess Deny
the net.md_5.bungee.api.chat.BaseComponent doesn't support ChatColor.MAGIC ?
Is it possible to generate new worlds in another thread? Trying to do that, I get this exception: java.lang.IllegalStateException: ChunkLoadEvent cannot be triggered asynchronously from another thread.
okay
@stark oxide not sure, but maybe if you use the p fork
my villagers wont change proffession in my server. I summon them with the egg, place down the lectern, they pickup a job and then wont change
ping me if you can help
Im here to help please send your questions again if you still need help with them and please be patient as im not a superhuman
uh
my villagers wont change profession in my server. I summon them with the egg, place down the lectern, they pickup a job and then wont change
@frigid ember please DM me your plugin list as it looks like a plugin is cancelling the event
Guys i have a small question: can a player spoof (or change) the value of player.getFallDistance()?
Heh, BuildTools crashes if your Bukkit folder is completely empty because it can't find the .git repo
@tidal mica not easily
@crimson sandal Just clear the folder where buildtools.jar is in
so without cheats a player can't spoof it?
I donโt see how you would spoof anything without cheats
XD stupid question...
I'm writing a script so that travis can cache BuildTools, I only wanted to cache Bukkit/CraftBukkit/Spigot folders to prevent them having to be redownloaded every time but seems like I may just have to do that anyway
you do
someone wrongly marked my issue on the jira as resolved, how do i get reopened?
What's the issue?
It seems pretty clear that your other issue was used instead of this one
Does anyone know a good tutorial for using the worldguard/edit api's? The Javadocs are not clear to me; and the latest tutorial I can find is from 2017 and outdated
the other one is marked as resolved too though
they implemented an event call after my first issue, but its not complete
so i opened another issue
Hey, i have some problems with the Spartan anticheat
Hey spigot dev here let me take a look for you
Ask the SpigotMC community for a fix```
@forest plaza The issue has been resolved in deed the PR submitted was approved and implemented on 30/06/2020
yea
did you tried other spigot jars?
no
well what you waiting then
@forest plaza if you believe the issue has not been resolved properly contact the PR creator
i must use this spigot....
@forest plaza if you believe the issue has not been resolved properly contact the PR creator
@neat oxide i did message him, he didnt respond
and no chance to get this missing sttuff in it?
he would have to build something special for you
i even know, why it isnt working properly
without the use of this lib
i need a spigot with 1.7 and 1.8 support
how many of those 1.7 users actually donate to sustain your server?
line 39:
UUID uuid = UUID.fromString(str);
line 27 is just my method calling
private void loadData() {
for (String str : getConfig().getConfigurationSection("").getKeys(false)) {
UUID uuid = UUID.fromString(str);
int steps = getConfig().getInt(str);
Counter.Count.put(uuid, steps);```
method
๐คฆโโ๏ธ
Dude how many times do i have to say this to you
go to the forums they are better equipped to help you
wtf im not making a ticket for this
why would this be a help channel if you would advise people to make a ticket each time
Because this is for quick helps not to solve your wanky ass code
also your issue is your passing a string "reload" into the UUID parser
needless to say "reload" is not a UUID
java.lang.IllegalArgumentException: Invalid UUID string: reload
so what can i do about my resolved issue thats not resolved?
@forest plaza let me talk to parker and blackhole
just PM me the details of the issue
@subtle blade Did you make PR CB#699?
Idk what it is based on number lol
I need some help. I just started with making plugins. I want to open a gui and the items in it cant be taken out. Im trying to access the name of the inventory but I don't know if I did it right.
This is what I have rn:
e.setCancelled(true);
}```
e is an InventoryClickEvent btw
@forest plaza here is claiming you made a error during the implementation
@long narwhal may i suggest you create a custom inventory handler and test if the instance of the clicked inventory matches your handler instead of comparing two strings?
@long narwhal use .getInventory instead of .getView
@long narwhal use .getInventory instead of .getView
@neat oxide getTitle() doesn't exist in getInventory()
Dafuq it should
no title is always of inventory view
derp
long time since i tinkered with inventories
@long narwhal code should work make sure the title actually matches otherwise it wont work of course
this is the inventory
Inventory gui = Bukkit.createInventory(p, 27, ChatColor.GRAY + "Admin Tools");
did you log the name and see if its the right inventory?
maybe try to strip the name of color and compare it then. but i suggest you use custom inventory handlers instead
im having a big brain moment, how would i check to see if there are arguments in a command
i tried if (args.length < 1) and if (args[0] == null)
maybe try to strip the name of color and compare it then. but i suggest you use custom inventory handlers instead
@forest plaza how do I do that?
args.length > 0
alright
ChatColor.stripColor()
where do I put it?
if(ChatColor.stripColor(e.getView().getTitle()).equals("Admin Tools")) {
thx
on second thought, if you just replaced == with equals, it could work too
how can you strip color of a boolean
can someone suggest a plugin for 1.15 that can edit item effects like slowness
@tiny dagger ChatColor.stripColor(e.getView().getTitle()).
if(ChatColor.stripColor(e.getView().getTitle()).equals("Admin Tools")) {
@forest plaza I am still able to take out the items
can you pm me your code from the eventhandler?
ok
Anyone know why this happens when i try to zip all server files
its my plugin command
i mean i try to make all server files .zip to new file
Hello
When i write "pl" in console i see all plugins
When i write "pl" in game i see this error in console
[13:18:17] [Netty Epoll Server IO #1/ERROR]: io.netty.handler.codec.EncoderException: String too big (was 38054 bytes encoded, max 32767)
i mean i try to make all server files .zip to new file
@frigid ember Are you actually disabling file saves and flushing ?
Don't server hosts come with a backup feature
Well be sure that no writing is going on anywhere on the files while making a copy of them
you'll just end with corrupt stuff
Any solution for my problem?
as you said
the zip is corrupted
so you know any methods i can get all server files and make new zip file
Java method seems not working
can someone suggest a plugin for 1.15 that can edit item effects like slowness
I did make a backup plugin in the past, but I can't share its code
i don't have a lots of plugins
@opaque swan did u just say 73 plugins isn't a lot?
as its closed source and not discloseable
well i dont code
wut
okey
javadoc is dead lmao
lol
No it isn't
@sturdy oar remove the undefined someone screwed up during regeneration of the search index
Just replace the first 'bukkit' with spigot
can someone help me figure out what im doing wrong with these args
if (args.length < 1) {
sender.sendMessage(ChatColor.RED + "Usage: /control <player> <message | /command>");
}```
this should return the Server root folder technically
oh
@frigid ember https://www.spigotmc.org/wiki/spigot-plugin-development/
The home of Spigot a high performance, no lag customized CraftBukkit Minecraft server API, and BungeeCord, the cloud server proxy.
here
when i type /control by itself it says theres an internal error
What does the error say
https://pastebin.com/vtPSHfJv this is the error
Caused by: java.lang.ArrayIndexOutOfBoundsException: Array index out of range: 1
how do i fix that
you are accessing the array in an illegal index probably
will this work?
yes
idk, but I'm sure that returns the server folder in 99% of servers
(args.length < 1)
makeing an plugin that sends server backup to google drive
oh?
Java convention would have it as "CommandControl"
oh i see the issue i think
you definetively want to toggle it as false while making a backup
public static void stopWorldSave(World w) {
w.setAutoSave(false);
}
Bukkit.getWorlds().forEach(this::stopWorldSave);
something like this maybe
hmm so i have to stop world save right
you should know that... if you're making a backup plugin
I wouldn't honestly do it the way you're doing but, if you make it work good for you
its working
does anyone know an effective way for stopping players from being able to jump?
when I do that they get stuck in a teleport loop for some reason
anybody else experiencing problems with the search feature in the javadocs?
for example, if searching for Player and clicking on the result, it redirects me to: https://hub.spigotmc.org/javadocs/spigot/undefined/org/bukkit/entity/Player.html, instead of https://hub.spigotmc.org/javadocs/spigot/org/bukkit/entity/Player.html
im using the bukkit ones at the moment because the spigotmc.org ones are acting really weirdly
oh finally
i finished my plugin
thanks to you
@sturdy oar
does someone have a good 1.7 Spigot with config?
i need that for UHC bro
yeah 1.7 sources have been long removed
https://hub.spigotmc.org/javadocs/spigot/org/bukkit/potion/PotionEffectType.html#FAST_DIGGING
does this give fast mining, or does digging mean only when using shovel?
I have a 1.7 spigot lying around somewhere I think
But god knows where it is
Itโs Haste @fossil shoal
Itโs fast mining/digging
doesn't seem to be in PotionEffectType
oh ok, thanks, I didn't understand at first
Hello, humm.. are there been any server-crash reported since the 1.16.1 ? Or is it just me (and therefore just my server) ? ๐ค
whats the best way to store a lot of player data for a lot of players?
what kind of database?
Or per player file
Hello, so, my server is crashing kinda randomly with an error that tells me to read it, look for plugins names and if there isn't, to check with Spigot directly.
And that is the case, yesterday there was a plugin name inside of the logs, so I removed the said plugin (it was WorldGuard), but today it happened anew (without any plugin name i could spot)
So hum, i am posting here just the beginning of the error (as it is quite big), if you want to see it all just tell me.
Any help would be appreciated โค๏ธ
Done (it's bigger than I thought >.< )
oh ! I forgot about that tool !
Alright I go for it, lemme clean this
?paste
I pastebinned it ! :3
I see some CoreProtect and ProtocolLib in the crash
it looks like there's some thread blocking operation going on
I'm not entirely sure but something may be related
were your players doing anyting weird?
Well maybe they weren't updated to 1.16 ? ๐ค
wut
Not as i am aware. There was 4 players online
I mean it could even be a spigot bug, but that's like really rare
Yes I guess so, but I couldn't spot plugin names, so I'm glad you could !
I'll check on the said plugins, it will probably work (since otherwise, you'd have gotten a lot more people talking about it)
Thank you a lot for your help anyway, I hope it'll work ! :3
Hello guys i have server and we have one problem we need authme to 1.16.1 but authme has not creates yet. So i need some similar plugin like a authme
https://prnt.sc/tc6yyi someone know how summon that sweep attack small particle ?
Is there a way to get what entity was interacted with uising PlayerInteractEntityEvent?
or PlayerInteractAtEntityEvent
oh nvm i got it
Is there a simple way of manipulating the world generation ? (editing biomes rarity, add some blocks, etc)
Terraincontrol?
im getting a bug on spigot where bees are inside their hives but will not come out no matter what you do, they come out in singleplayer but not in a spigot server
is there any way to fix it
do you have any plugins?
how would I set the vector as a parameter
@frigid ember https://hub.spigotmc.org/javadocs/spigot/org/bukkit/entity/Entity.html#setVelocity(org.bukkit.util.Vector)
In the latest 1.16 spigot, if I teleport a player during an damageevent, I get the following error:
Caused by: java.lang.IllegalStateException: Removing entity while ticking!
This was not the case in 1.12
Is there any way to teleport the player during this event without encountering the above error? Idk if this is a spigot bug
Pinging @zealous lynx as he's pretty smart
are you teleporting him while he's dead
@zealous lynx That was my thought too, but seemed a little hacky to me.
For example what if events occur between the scheduling and the actual teleport that shouldn't occur because the player should be already gone?
@sturdy oar No
@frigid ember a vector is just a set of 3 numbers, x, y and z
oh ok
Someone linked above the setVelocity() method
@sturdy oar Sorry that was a little blunter than I meant it to be, any other theories?
What?
setVelocity(new Vector(x, y, z));
Yes... you use entity.setVelocity(Vector)...
a vector is just a set of 3 numbers, x, y and z
It's just a tool
Get their current direction and .multiply(10)
Though as far as I know, thereโs a hard limit on a velocity of magnitude 4
yeah from personal experience
if you set an arrow too fast
it doesn't go straight anymore
There are arithmetic methods on the vector class
Choco you got any idea why this would no longer be valid?
Vector has a multiply function.
Vector class just saves you the math behind vectors
which i'd honestly recommend to learn tho
Also, on whaty Choco said, don't get their direction if you want to make them faster
Use their current velocity to make them go faster in current direction of momentum
@wheat mirage you can schedule it to happen on the next tick. Should be fine
Right sorry
@zealous lynx Yeah I think that's my best bet, thanks
Hello everyone, can anyone recommend a plug-in for auto flags in the region for version 1.16.1?
autoflags?
Yes that will work fine, Simon
@zealous lynx What I'm actually going to do is set to spectator instantly, then teleport and set back. Hopefully that'll stop any issues with things happening inbetween.
need a plugin so that when a player creates a region, pvp will automatically turn off in it, please help
Services and recruitment on forums @mystic yacht
oh okay thanks
I think you should go for another approach if you want an arrow that is not affected by water
What to do if it spam it in the console?at com.google.gson.internal.$Gson$Types.resolve($Gson$Types.java:383) ~[server.jar:git-Spigot-0287a20-7560f5f]
@EventHandler(priority = EventPriority.HIGHEST)
public void onWorldInit(WorldInitEvent e) {
e.getWorld().setKeepSpawnInMemory(false);
}```
Spawn chunks in the main world are still being kept in memory :/
I'm listening to all chunk unload events and seeing what's going on
When I teleport away from spawn - no chunk unloads
When I teleport to spawn
Loads
@frigid ember NMS probably the most reliable, custom arrow projectiles.
help me
Spigot's main class?
@frigid ember Which did you learn first, spigot or java?
Just wondering
Send your stacktrace
@subtle blade Do you know if keepSpawnChunks in memory isn't working atm? Couldn't find anything on jira.
hello, i am using the console schedule plugin and i am wondering how to make it use a world reset command. because when i type in the command section worldreset reset world it does not work. do i need to put [CONSOLE] in front of it?
was there a worldreset command built in?
built in? wdym by this?
dont think so, which plugin do you use
i mean added by mc bukkit or spigot
built in? wdym by this?
@wise spoke
i am pretty sure it was not built in. i added the .jar myself.
then am asking its name
ConsoleScheduler
๐คฆโโ๏ธ
yeah ik
ok thanks
i will tell your problem now
i mean probably
this command probably maked for runing by player
so plugin can understand the world
f
or you will need to insert name of world
are you sure that "worldrest" command supports inserting world name?
oh no sorry my bad. just joined the world and it worked fine
it wasnt saying the output message
hello, i was wondering if a plugin existed where it blocked the tab autocomplete for every command except the ones people have access to
"people access to"
plugin cant understand this automaticly
cus theres no way of it
i mean none of plugin uses permission in plugin.yml so its impossible
if theres- then you will have to tell the plugin which command it should block
I mean some big servers have a way of sending an 'unknown command' message when people try to use commands they don't have access to
yeah i get it thanks
and you can edit some messages in jars
Re-iterating: e.getWorld().setKeepSpawnInMemory(false); does not work in 1.16 it seems
@wheat mirage keepSpawnChunks works, you just need to early init your plugin
public void onWorldInit(WorldInitEvent e) {
e.getWorld().setKeepSpawnInMemory(false);
}``` isn't valid for the main world due to mc's early loading?
It's the same reason world-container broke ah
I don't think early init will work for that
first of all highest will run last
then is it spigot's event=
ya just add load: startup to the plugin.yml file
and if im right there was "onload" method
not sure that it is javaplugin's method
chech it
@zealous lynx Plugin's too big to do that with guarantee of no issues from it, I'm just going to iterate over getWorlds() in my onenable
Same result right?
(and keep the WorldInitEvent ofc)
Just the main minecraft world
I'll wait
why not just use builtin feature
(Where the bug errors anyway)
back when i was adding spawn chunk disable to my config it seemed like setKeepSpawnInMemory() doesn't do anything after spigot is finished initializing everything
how do i kill an entity?
remove() it
does remove() drop its loot?
no
actually depends on when you kill
Is there a http api for getting a plugin by its version? (i.e., similar to Maven. )
in old versions if you kill it when server shutting down it drop loots
ah, had no idea about that
killing entity ondisable isn't secure
I have a config where i have 2 seperate guis made, I already load them etc, but i want to make a it change every 24h, so like GUI A is in for 24 hours then GUI B replaces GUI A how would i do that?
@zealous lynx https://hub.spigotmc.org/jira/browse/SPIGOT-5824
Seems the main world is loaded before spigot gets anything going
you need load: startup
So even startup is too late
@wheat mirage use builtin feature
no it isn't my plugin does it just fine
KingOf0, no thank you
unless the newest build breaks it
@true anvil check runnables
@zealous lynx what version are you on? This seems to have started in 1.15
Need some help getting started.
I just installed spigot for a server I started hosting last week. I've used spongeForge before for a 1.12 modded server and cauldron back when that was relevant, so I'm kind of familiar with the process of installing an alternate jar and getting addons... but at the same time I'm having trouble navigating to find what I need as far as plugins. Is there a way to filter the hordes of plugins in the resources section of the site beyond category, e.g. by game version? Search terms and category is not sufficient for narrowing down over 1000 plugins (especially when most categories have over 1000 plug-ins themselves)
Regardless, my fix seems more reliable
Iterating over worlds in OnEnable is a better solution
1.15 works great, im on CraftBukkit version git-Spigot-beb7d47-145921e (MC: 1.16.1) (Implementing API version 1.16.1-R0.1-SNAPSHOT)
still works
ok
is it necessary to pregenerate the nether in 1.16.1?
If you're talking about my message, I removed it @fair abyss
I decided to edit it before sending it again
i mean i've never pregenerated the nether before
(1.12.2->1.15.2)
but new biomes etc.. seems like i need to
did you ever gone to nether?
it's a new world
and new chunks will be 1.16.1 probably
if its new world how did you go nether
and why you want to pregenerate
i confused now
if you have old world, created chunks will be same
new created chunks will be have new biomes
if its not old and just created now
just delete it and it will recreate with 1.16.1 features
i mean probably didnt try ever in nether
Any advice on sorting through the resources section like I was asking? In particular I'm looking for some sort of essentials plugin and a permission manager
@zealous lynx Just tested with an unload event that logs whether the world has setKeepSpawnChunksInMemory enabled
Spawn chunks aren't getting unloaded ,but the flag is false
@delicate shuttle luck perms and essentials x
More importantly
Even when the server goes offline
The chunkunloadevent is never called
i haven't directly proven it still works in 1.16, but:
on startup it doesn't do the 0% - 100% when loading
Basically i'm logging this
so i figured it was still working
[13:15:21] [Server thread/INFO]: false
[13:15:21] [Server thread/INFO]: CraftChunk{x=-5z=15}
[13:15:21] [Server thread/INFO]: false
[13:15:21] [Server thread/INFO]: CraftChunk{x=-7z=15}
[13:15:21] [Server thread/INFO]: false
[13:15:21] [Server thread/INFO]: CraftChunk{x=-6z=15}
[13:15:21] [Server thread/INFO]: false
[13:15:21] [Server thread/INFO]: CraftChunk{x=-9z=15}
[13:15:21] [Server thread/INFO]: false
[13:15:21] [Server thread/INFO]: CraftChunk{x=5z=15}
[13:15:21] [Server thread/INFO]: false
[13:15:21] [Server thread/INFO]: CraftChunk{x=3z=15}
[13:15:21] [Server thread/INFO]: false
[13:15:21] [Server thread/INFO]: CraftChunk{x=4z=15}
[13:15:21] [Server thread/INFO]: false
[13:15:21] [Server thread/INFO]: CraftChunk{x=6z=15}
[13:15:21] [Server thread/INFO]: false
[13:15:21] [Server thread/INFO]: CraftChunk{x=7z=15}
[13:15:21] [Server thread/INFO]: false
[13:15:21] [Server thread/INFO]: CraftChunk{x=10z=16}
[13:15:21] [Server thread/INFO]: false
Boolean whether the world has spawn chunks in memory enabled
And the chunk
I never see any with both x and z < 5
Thanks @pastel condor
Yup no problem
@zealous lynx No idea why, is there a flag in the server to set? The code just refuses to work
for testing i put code in a timer, before i log in it says:
[13:23:26] [Server thread/INFO]: number of loaded chunks: 0
i will log in now
[13:24:58] [Server thread/INFO]: number of loaded chunks: 729
now i log out
[13:25:21] [Server thread/INFO]: number of loaded chunks: 0
Send me over the code and I'll try it myself
the number im outputing is the length of the array returned by the world's getLoadedChunks()
i didn't make a tiny plugin for testing, i just added code to my main plugin, if you want i can make a tiny one that just disables spawn chunks the same way my plugin does
@EventHandler(priority=EventPriority.HIGHEST)
public void onWorldInit(WorldInitEvent evt)
{
if(Config.DisableSpawnChunks)
{
Main.doInfoMsg(Main.ConPre + " Disabling Spawn Chunks For \""+evt.getWorld().getName()+"\"");
evt.getWorld().setKeepSpawnInMemory(false);
}
}
this combined with: load: startup in the plugin.yml
w.setKeepSpawnInMemory(false);
}
Bukkit.getScheduler().runTaskTimer(this, () -> {
Bukkit.broadcastMessage("Loaded: " + getMainWorld().getLoadedChunks().length);
Bukkit.broadcastMessage("Force Loaded: " + getMainWorld().getLoadedChunks().length);
}, 0, 20 * 5L);
In onEnable
I'll see what it gives
(ignore my odd way of doing the output message in that code btw)
[13:31:48] [Server thread/INFO]: Force Loaded: 529
[13:31:49] [Server thread/INFO]: Liquake issued server command: /hub
[13:31:49] [Server thread/INFO]: Liquake lost connection: Disconnected
[13:31:53] [Server thread/INFO]: Loaded: 529
[13:31:53] [Server thread/INFO]: Force Loaded: 529
>
;-;
@zealous lynx Any ideas?

