#help-archived
1 messages ยท Page 12 of 1
I read that long time ago..
it's ok
Hosting at home probably not worth it unless you have top internet speeds
@glacial plaza yep, agree, that is the point.. coz I'm not sure my location is better for ping comparing with France-located hosting)
Hosting companies take care of most of the stuff
If the parrot is on a solid block you might be able to use packets to put the jukebox two blocks below it and play/pause the jukebox really quickly to start the animation. Pausing the jukebox might not work, though, so you could use a resource pack to make one of the discs silent and put the music file for it elsewhere. Then just listen for when a player actually uses the jukebox and play the music manually.
TL;DR wizardry and packet magic might work.
idk could try doing that
Hosting companies take care of most of the stuff
@frigid ember yeah, but the price for me is too high, like for the pet-project. That's why I'm thinking about own server-pc
*the price for better hardware
Well, if you know how to properly set up your network in terms of security and other things then why not
uh, life is full of challenges)
ikr
I just need your thoughts) Thanks guys!
Have a good day and let corona doesn't beat u)
i had a home server
didnt use it for anything public beyond hosting small servers for my friends
there going to be that one sad prick that just ruins your day
it's backdoor time
ohh yeah
What's the plugins name that allows players to click on JSON messages from npcs? To execute a command
I swear there was one but I'm not sure what it's called
Citizens... maybe?
I don't think citizens allows that
wdym json messages
CitizensCMD allows to send commands on right click
like chat messages that show up in chat?
it binds the cmd
which you could do a command in it
Yeah
that has an executor command
like there a plugin
called MyCommands
where you can write up the command in there
with the text
then just bind it to the citizen using CitzensCMD
Idk if citizens supports it but if they support tellraw chat
Like the npc sends a message and the player can hover over either like [yes] or [no] and click it to execute a command
right
look into citizens, they might allow tellraw messages
well actually
they do
citizensCMD
org.bukkit.plugin.InvalidPluginException: java.lang.IllegalArgumentException: Plugin already initialized!
at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:133) ~[spigot.jar:git-PaperSpigot-"4c7641d"]
at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:331) ~[spigot.jar:git-PaperSpigot-"4c7641d"]
at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:254) [spigot.jar:git-PaperSpigot-"4c7641d"]
at org.bukkit.craftbukkit.v1_8_R3.CraftServer.loadPlugins(CraftServer.java:293) [spigot.jar:git-PaperSpigot-"4c7641d"]
at net.minecraft.server.v1_8_R3.DedicatedServer.init(DedicatedServer.java:202) [spigot.jar:git-PaperSpigot-"4c7641d"]
at net.minecraft.server.v1_8_R3.MinecraftServer.run(MinecraftServer.java:563) [spigot.jar:git-PaperSpigot-"4c7641d"]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_242]
Caused by: java.lang.IllegalArgumentException: Plugin already initialized!
at org.bukkit.plugin.java.PluginClassLoader.initialize(PluginClassLoader.java:123) ~[spigot.jar:git-PaperSpigot-"4c7641d"]
at org.bukkit.plugin.java.JavaPlugin.<init>(JavaPlugin.java:66) ~[spigot.jar:git-PaperSpigot-"4c7641d"]
at me.imhard.Main.<init>(Main.java:11) ~[?:?]
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:1.8.0_242]
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[?:1.8.0_242]
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:1.8.0_242]
at java.lang.reflect.Constructor.newInstance(Constructor.java:423) ~[?:1.8.0_242]
at java.lang.Class.newInstance(Class.java:442) ~[?:1.8.0_242]
at org.bukkit.plugin.java.PluginClassLoader.<init>(PluginClassLoader.java:77) ~[spigot.jar:git-PaperSpigot-"4c7641d"]
at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:129) ~[spigot.jar:git-PaperSpigot-"4c7641d"]
Help me? '-'
then use tellraw
Alright thanks
@old barn two plugins have the same name in plugin.yml
so you have either a duplicate
or something is going wrong
tile entities are blocks
[20:59:21] [Server thread/INFO]: Attempted to place a tile entity (net.minecraft.server.v1_15_R1.TileEntityHopper@27f7af55) at -450,126,-568 (Block{minecraft:air}) where there was no entity tile! [20:59:21] [Server thread/INFO]: Chunk coordinates: -464,-576 [20:59:21] [Server thread/WARN]: java.lang.Exception [20:59:21] [Server thread/WARN]: at net.minecraft.server.v1_15_R1.Chunk.setTileEntity(Chunk.java:456) [20:59:21] [Server thread/WARN]: at net.minecraft.server.v1_15_R1.Chunk.a(Chunk.java:433)
oh dear
After removing something I stored persistentdata on with worldedit
i have no clue what that means
neither do i
I'll try resetting the world and seeing if it was something else
have you tried a server restart?
That's what caused it lmao
it usually corrects things like that on its own
ok then
so did you restart
in the middle of an edit?
no
that's usually where I have issues
when I stop it in the middle of a large edit
did you go to the chunk coordinates
@wanton delta There are no 2 plugins with the same name in plugin.yml
When I set it to air this also happens ๐คทโโ๏ธ
[21:05:24] [Server thread/WARN]: Block entity invalid: minecraft:hopper @ BlockPosition{x=-105, y=102, z=-79} [21:05:24] [Server thread/WARN]: Block entity invalid: minecraft:hopper @ BlockPosition{x=-106, y=102, z=-78} [21:05:24] [Server thread/WARN]: Block entity invalid: minecraft:smoker @ BlockPosition{x=-105, y=101, z=-79} [21:05:24] [Server thread/WARN]: Block entity invalid: minecraft:smoker @ BlockPosition{x=-106, y=101, z=-78} [21:05:24] [Server thread/WARN]: Block entity invalid: minecraft:hopper @ BlockPosition{x=-106, y=102, z=-80} [21:05:24] [Server thread/WARN]: Block entity invalid: minecraft:hopper @ BlockPosition{x=-107, y=102, z=-79} [21:05:24] [Server thread/WARN]: Block entity invalid: minecraft:campfire @ BlockPosition{x=-106, y=103, z=-79} [21:05:24] [Server thread/WARN]: Block entity invalid: minecraft:smoker @ BlockPosition{x=-106, y=101, z=-80} [21:05:24] [Server thread/WARN]: Block entity invalid: minecraft:smoker @ BlockPosition{x=-107, y=101, z=-79}
I'll try resetting the world and seeing if it was something else
@fleet burrow fuck
org.bukkit.plugin.InvalidPluginException: java.lang.IllegalArgumentException: Plugin already initialized!
at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:133) ~[spigot.jar:git-PaperSpigot-"4c7641d"]
at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:331) ~[spigot.jar:git-PaperSpigot-"4c7641d"]
at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:254) [spigot.jar:git-PaperSpigot-"4c7641d"]
at org.bukkit.craftbukkit.v1_8_R3.CraftServer.loadPlugins(CraftServer.java:293) [spigot.jar:git-PaperSpigot-"4c7641d"]
at net.minecraft.server.v1_8_R3.DedicatedServer.init(DedicatedServer.java:202) [spigot.jar:git-PaperSpigot-"4c7641d"]
at net.minecraft.server.v1_8_R3.MinecraftServer.run(MinecraftServer.java:563) [spigot.jar:git-PaperSpigot-"4c7641d"]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_242]
Caused by: java.lang.IllegalArgumentException: Plugin already initialized!
at org.bukkit.plugin.java.PluginClassLoader.initialize(PluginClassLoader.java:123) ~[spigot.jar:git-PaperSpigot-"4c7641d"]
at org.bukkit.plugin.java.JavaPlugin.<init>(JavaPlugin.java:66) ~[spigot.jar:git-PaperSpigot-"4c7641d"]
at me.imhard.Main.<init>(Main.java:11) ~[?:?]
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:1.8.0_242]
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[?:1.8.0_242]
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:1.8.0_242]
at java.lang.reflect.Constructor.newInstance(Constructor.java:423) ~[?:1.8.0_242]
at java.lang.Class.newInstance(Class.java:442) ~[?:1.8.0_242]
at org.bukkit.plugin.java.PluginClassLoader.<init>(PluginClassLoader.java:77) ~[spigot.jar:git-PaperSpigot-"4c7641d"]
at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:129) ~[spigot.jar:git-PaperSpigot-"4c7641d"]
Help me? '-'
hey, so basically i left a world that i didnt want to work with spigot use spigot and now my dimension files are in 3 different folders, is there any way to merge them back?
@old barn if two plugins are using the same package name, that could be an issue. For example, if you made a plugin and the package was main.hard.superplugin and you made another with main.hard.superplugin, that would be a problem. Package names need to be unique. That's why I always make my package names main.dartanman.pluginname. For example, my duels plugin is main.dartanman.duels and my EvilAdmin plugin is main.dartanman.eviladmin
he already got an answer and just ignored it
then came back again
give him 10 minutes, he'll do it again
hi all, whats the best way to get the current version of a resource on spigot programmatically?
does anyone know does this still work?
Yes it does
does it work if its a zipped file with 2 jars in it?
oh so it has to be a pure jar file
Why would you upload two jars?
bungee / spigot version of plugin
I heard of that, are there any examples of this?
like two seperate resources altogether?
oh yeah bungee and bukkit works togheter
oh so one for bukkit and one for bungee is it?
hmm, interesting
you can share resources between each other
Eh, yes and no
Bungee plugins should work exclusively on the bungee side. You can't, for instance, use a Player object on the Bungee side
yeah
yes thats what I meant
but like a util class yes it can work
You can transfer necessary data through the plugin messaging channel afaik
same with database class possibly
you have to have one player online for that to work
Stateless utilities that don't rely on either API will work on both, sure
If you import, say, Location into your util class, you can't use it on bungee

its an interesting principle then there is only one codebase
as I have two independant plugins one for bungee and one for spigot
they both share the same database related code
@subtle blade should I post a bug report here? https://hub.spigotmc.org/jira/projects/PLUG/issues/PLUG-310?filter=allopenissues or are you verifying if it's a spigot api bug?
No, that's the JIRA for plugin annotations. I'm suspicious that it's a bug though I'm not sure if it's as a result of Spigot so I'd hold off for now
right
why is there so much Essentials stuff Did not see it was for plugins ๐ค
I'll do some playing around later and see if it's necessary
cool, thank you ๐
Can anyone help me? '-' https://www.spigotmc.org/threads/holographic-displays-error.429325/
@EventHandler(priority = EventPriority.HIGH)
public void onPlayerInteract(PlayerInteractEvent e) {
if (!e.getAction().equals(Action.RIGHT_CLICK_BLOCK)) return;
if (!(e.getClickedBlock().getState() instanceof TileState)) return;
if (machinery.getMachineManager().getMachinePartLocations().contains(e.getClickedBlock().getLocation())) {
e.setUseInteractedBlock(Event.Result.DENY);
}
PlayerMachine machine = machinery.getMachineManager().getMachineCores().get(e.getClickedBlock().getLocation());
if (machine != null) {
e.setUseInteractedBlock(Event.Result.DENY);
e.setCancelled(true);
System.out.println(e.isCancelled());
e.getPlayer().sendMessage(ChatColor.translateAlternateColorCodes('&',
machinery.getFileManager().getConfig("config.yml").get().getString("open_machine_gui_message")));
// TODO: Open gui machine management GUI logic
}
}
So I have this but for some reason when I right click the command block (machine core) it doesn't deny the interaction/cancel it but it does send the message
I am on 1.15
i need help i cant import my survival world into my minecraft server
i have a spawn but when i typ e/mv import Suvival(the name of the world) the mesage pop up failed?
the plugin is multiverse core
any1 can help me -ls?
Try asking in the Multiverse Discord. Server rules don't allow me to link it.
I'd say linking it is fine
right now the bot will probably delete your message because you aren't verified though
hey guys im a little bit tired and i dont know what to do. ```java
public class ReloadTabCompletion implements TabCompleter {
@Override
public List<String> onTabComplete(CommandSender sender, Command command, String alias, String[] args) {
if(args.length == 1){
List<String> options = new ArrayList<>();
options.add("reload");
options.add("generateNewConfigFile");
for(String s : options){
if(!s.toLowerCase().startsWith(args[0].toLowerCase())){
options.remove(s);
}
}
return options;
}
return null;
}
}
this returnes me error everytime when i trying to type reload
Nobody is answering my messages in spigot.com... the developer of bannerboard never answered and spigot help center neither... I want my regund back! ... Who can attend me from spigot employers?
๐คฌ
the only way is to solve this with the developer
how to make sure packets are send in a correct order?
But he dont answer
@vast dome If he does not answer, get in contact directly with paypal
he will be forced to answer there
then file a dispute in paypal
exactly
don't do a charge back tho, don't be that guy
any1 can help me -ls?
@everyone
No
damn
nope
#spigotcraft is a server where you can help test it
but there is no public release of a 1.16 snapshot for spigot
only as far as 1.15.2
Likely wont have anything until maybe a prerelease
you guys know when the snapshots going offcial?
i havent played mc in along ass time how long does it usually take em these days?
no idea
they're gotten "faster" because of their team's expansion
although not always preferred since fast can also mean rushed features ;P
team size doesn't really matter, as long as there testing and competency is good, I think thats more important
you could have a huge dev team, but shit testing
and the end result is poop. You could also have a small team, extensive testing and community testing and boom you should have something quite stable from release
I wonder do mojang do community or beta testers
or are they still keeping it all in house
We get snapshots usually on a weekly basis from what they've been doing recently. But they have been pumping tons of new content into snapshots so it is hard to tell when they will move to pre-releases. Likely when we start seeing mostly bug fixes snapshots, that will be a sign of getting close
Then it usually is 2-5 weeks after that for an actual release
ahh I see
i wish mojang just took more time fixing and improving the game instead of throwing new stuff on top of the old one
if they stop adding new stuff, people will get bored of it?
I mean they have been
people aren't even playing it
I guess better playability is better than shiny new features, I think so anyway
so many of my buyers keep telling me 'support 1.8.8, the performance is so much better meee'
As I stated earlier somewhere, they have been rewriting a lot of notchian code. Lighting for example was done all over the place and they moved it into a centralized area to help maintain it better
ahh
But if you look at statistics, a vast majority of servers are on newer versions
thats true
also i wanna see the stats on how many of those bought a dedicated server to host it
82,354 servers (53.1%) are on 1.15.2
@EventHandler(priority = EventPriority.HIGH) public void onPlayerInteract(PlayerInteractEvent e) { if (!e.getAction().equals(Action.RIGHT_CLICK_BLOCK)) return; if (!(e.getClickedBlock().getState() instanceof TileState)) return; if (machinery.getMachineManager().getMachinePartLocations().contains(e.getClickedBlock().getLocation())) { e.setUseInteractedBlock(Event.Result.DENY); } PlayerMachine machine = machinery.getMachineManager().getMachineCores().get(e.getClickedBlock().getLocation()); if (machine != null) { e.setUseInteractedBlock(Event.Result.DENY); e.setCancelled(true); System.out.println(e.isCancelled()); e.getPlayer().sendMessage(ChatColor.translateAlternateColorCodes('&', machinery.getFileManager().getConfig("config.yml").get().getString("open_machine_gui_message"))); // TODO: Open gui machine management GUI logic } }So I have this but for some reason when I right click the command block (machine core) it doesn't deny the interaction/cancel it but it does send the message
@fleet burrow Anyone? ๐ฌ
Nevermind i fixed it
@fleet burrow ||first, would be better to use getBlockLocation() instead of getLocation() in your if statement ๐||
Then, let me analyze your code 1 more minute
So, yeah, in your getMachinePartLocations() you have to be sure that you return a list of block locations
It sends the message
e.getPlayer().sendMessage(ChatColor.translateAlternateColorCodes('&', machinery.getFileManager().getConfig("config.yml").get().getString("open_machine_gui_message")));
This executes
What do you mean exactly by "it doesn't deny the interaction"
Well, the command block gui still opens
Your in 1.9+?
He's in 1.15
there are 2 hands in the interact event, one is probably still working while the other isn't
There is no logic involving hands though
So, do you think that the interact event doesn't prevent GUIs from being opened ?
Well, the GUI is still opening
buildtools is telling me fatal: '<some folder here>' does not appear to be a git repository fatal: Could not read from remote repository. when <some folder here> doesnt even exist???
heknon, i don't think it's a problem with your code. might be a bug, since same thing happened to me when i tried something similar to what you're doing but for a structure block. i just ended up closing the inventory on interaction
๐ค
Where can I see the message I received in #verification ? I don't know where to look on the SpigotMC website.
Alright, thanks ๐
It should be in conversations
has anyone set up tebex integration towards bungeecord and know how to issue commands towards single minecraft server/lobby?
@quick arch I'm not getting anything. How long does it usually take?
If I send a packet to a player, should that almost always be run on a different thread?
Did @tawdry lily reply with A private message has been sent to your SpigotMC.org account for verification! after you executed the command
if not, possibly try again
Yes
CafeBabe's probably just being slow
can anyone help me with buildtools lol
@wanton delta I have a completely automated batch file to download/update it on Windows. I can send it to you if you want.
i dont think that will fix my problem
Oh, I didn't see your earlier post
Hello plugin creators ๐ Need a bit of help. I am creating multiblock structure that player can build himself. What I did is I made structure that contains Block data and relative position of center block that is assigned on creation (center block has position of 0,0,0). So now I want efficiently on block place event if player built structure similar to saved structure. What I have now is and that is not efficient (checking 1 structure with 42k block takes like 20 seconds):
if(e.isCancelled())
return;
for(String name : plugin.getMechanicalStructureRegister().getRegisterNames()) {
Structure st = Main.getInstance().getStructures().getStructure(name);
if(st == null) {
continue;
}
for(Position pos : st.getBlocks().keySet()) {
if(st.getBlocks().get(pos).similar(e.getBlock().getTypeId(), e.getBlock().getData())) {
Location l = e.getBlock().getLocation().clone();
Rotation rotation = Utils.getStructureRotation(st, l, pos);
if(rotation != null) {
boolean skip = false;
for(MechanicalStructure mfs : Main.getInstance().getStructureThread().getAllStructures()) {
if(mfs.getLoc().equals(l) && !mfs.isDestroyed()) {
skip = true;
}
}
if(skip)
break;
plugin.getServer().getPluginManager().callEvent(new StructurePlaceEvent(st, l, rotation, e.getPlayer()));
break;
}
}
}
}
So basically you're checking if the player-built structure is the same as the pre-built structure?
would this always be true ? ๐ค
player.playEffect(location, Effect.RECORD_PLAY, DiscContainer.BASEDISC_MATERIAL);
new BukkitRunnable(){
@Override
public void run() {
player.stopSound(DiscContainer.BASEDISC_SOUND, SoundCategory.RECORDS);
}
}.runTaskLater(plugin, 1);
Can I safely assume that player.stopSound will always fire after player.playEffect?
can i use --compile NONE in buildtools if i want it add it to my local maven repo
@crystal trench This seems tangentially related to your question; I'm not sure if it'll help or not though.
https://bukkit.org/threads/how-to-generate-custom-structures.187674/
anyone know how to use bossshop api im trying to make an itemall item
BSBuy buy = bs.getAPI().createBSBuy("Test", BSRewardType.Money, BSPriceType.ItemAll, 100, "type:COOKED_CHICKEN", null, 5, null);
//Get a Shop
BSShop shop = bs.getAPI().getShop("Shop");
//Add it to the Shop
ItemStack item = new ItemStack(Material.COOKED_CHICKEN);
bs.getAPI().addItemToShop(item, buy, shop);```
@empty canopy It won't help ๐ฆ
Does someone know whether it is within the possibilities of MC that you can create a java application outside MC linked to your plugin, or if it is possible to recreate the screen used for advancements, but make it so that you can call it at a command for example and show it with your own 'advancements'?
is it possible to set an armorstand's helmet to a non equipable item? in 1.8
Hello again!
I'd like to ask server-owners, what view-distance do you set in your server.properties?
i leave mine too default
Hello good, I read some posts that said that you could connect two different servers using bungeecord. Is this possible?
Kind:
host 1 -> bungeecord -> prelobby -> lobby ->
host 2 -> bungeecord -> spigot serverOr the other thing I ask if it is possible is the following:
Host -> bungeecord 1 -> prelobby -> lobby
Host -> bungeecord 2 -> spigot server
(They are the same hosts but with different bungeecord. Is this possible?)
Is there an answer to my question?
my server is currently on 8
Hello there, do you know if WorldEdit API is usable during the Populate event of world generation ? Because I've tried and it gets me an unreadable error and I'm afraid it's unusable in this context
#verification seems to be broken
Anyone know of a join/leave message plugin that works with SuperVanish?
@foggy cargo yea you can make a java application outside of mc
java is still java
i once made a discord bot that runs inside of a plugin
how could you call it at a command?
Anyone that has experience with rTerminal cPanel? https://www.spigotmc.org/resources/rterminal-cpanel-โ-minecraft-webpanel.33149/
Hello, anyone knows PreciousStones plugin?
can i create a server here? on the official page?
@celest garden do you have a specific question?? dont ask to ask, just ask your question and someone will reply. you don't need a subject matter expert. that's a great way to guarantee you never get a reply
"Changes to work with WG7 and MC 1.15"
But i can't find it
i only find "Latest WG"
but it isn't working on 1.15
ok
thanks
Oh, he said he's not maintaining it anymore
can i create a server here? on the official page?
What do you mean "official page"
spigotmc is not a server hosting company or server list
ok, well
so i try to contact with him
reach out, see if you get some good luck
Hey guys, so running a server on my own hardware and for some reason half my friends can and half cant join??? Any suggestions on what to do??
Does anyone know of any plugin to see life on the tab?
I want to create a 24/7 minecraft server, can I create it?
Does anyone know of any plugin to see life on the tab?
Uhm anyone got any suggestions? Cant seem to work it out
Does anyone know of any plugin to see life on the tab?
the other half may be mentally retarded
you should probably ask them for the error they get tho and check if you have any errors in the console
is there a way to circumvent api-version because my plugin has multiple version support... but idk how to handle that field
Yes...but not here. We are not a hosting company.
@frigid ember but where can I create one 24/7?
like any site that pops up on google for minecraft hosting
Aren't you talking about displaying something at the client's end?
@sour dock
Yes I am, I want to create a GUI that is different than an inventory but I think that is not within the possibilities ๐ฆ
@magic heart https://lmgtfy.com/?q=mc+server+hosting+&iie=1
Hey guys, so running a minecraft server on my own hardware and for some reason half my friends can and half cant join??? Any suggestions on what to do??
How do you set a spawner (itemStack) type? (without NMS preferably)
is there a way to circumvent api-version because my plugin has multiple version support... but idk how to handle that field
Acts as a minimum version but is ignored on versions 1.12.2 and below because the server was unaware of it
Though you should be writing for more modern versions
@ashen stirrup afaik it's BlockStateMeta
https://hub.spigotmc.org/javadocs/spigot/org/bukkit/inventory/meta/BlockStateMeta.html
It's for ItemStacks
Really?
Yes
ItemStack spawner = new ItemStack(Material.SPAWNER);
ItemMeta spawnerMeta = (BlockStateMeta) spawner.getItemMeta();
or
BlockStateMeta spawnerMeta = spawner.getItemMeta();
Well the cast is useless in the first one, is it not? ;P
BlockStateMeta spawnerMeta = (BlockStateMeta) spawner.getItemMeta();
Ah yeah
You can get the block state using BlockStateMeta#getBlockState(), cast it to a CreatureSpawner, modify it how you want and re-set it with BlockStateMeta#setBlockState() again
Cheers ๐
Mhm so I have like the lapiz medal award and I can't change name :/ do you need to have the redstone one to have access for a name change or what?
frick
how do I get that one then?
@subtle blade do I need the redstone award particular for a name change?
Just any donation above the minimum grants you that ability
md processes donations manually though so if you've not yet gotten it then be patient. Also, if you've donated with an email not associated with your spigot account, create a thread in the Donation Enquiries forum
Yes but I mean
Do I need the redstone one for a name change or can lapiz give you the same access as well?
Because rn it doesn't seem like I can
I mightโve made a mistake adding your rank then
Iโve fixed it, give it up to and hour
ok thanks โค๏ธ
send in bin
Did you add bukkit as a depend
You dont seem to have the dependency added
Uhm can you browse to your dependencies?
oh right
i forgot to fix the buildpath thing
big brain
thx for the help!
it works now
:]
?donate
Send entire CubeyMc pls
Is there a method to get the exact point that the user is looking at on a block? All the ones I can find only allow you to get the block itself
Like, if I were to place your crosshairs dead center on the top of the block it'd be 0.5x 0.5z
Hey guys, what would be a good price for an animated spotlights plugin?
Spigot doesnt transmit coords that fine i believe we mostly use doubles for coords
doubles can be kinda precised
not that precise
@naive goblet that method was where the error said it was happening in
Send entire class still
@sharp trout Whats the use case?
I can do it with trigonometry using the pitch and yaw, but I just wanted to know if there was already a method for that
@frigid ember depends on quality and features
nvm issue resolved, thanks anyway ๐
(:
forgot how for loops worked after using foreach loops for so long ๐
Weow
Anyone from the development team know how i can hook up my intellji debugger into spigot server jar id hate to put a bunch of println's everywhere for debugging
What's wrong with orebfuscator?
Tell me i need it because i got some low level debugging to do
...spigot code? huh?
yeah you know craftbukkit
yea what about it
im trying to debug spigot atm
Send it
if you need any help with it feel free to dm or @ me
Sure
If I'm using custom annotations, is it ok to have enums?
public abstract class PEnchantment {
private Trigger trigger;
private EnchantmentInfo info = getClass().getAnnotation(EnchantmentInfo.class);
private final String name;
private final String desc;
protected PEnchantment() {
this.name = info.name();
this.desc = info.desc();
this.trigger = info.trigger();
}
public abstract void onTrigger(Player p);
public abstract Trigger getTrigger();
}
where trigger would be an enum
public @interface EnchantmentInfo {
String name();
String desc();
Trigger trigger();
}
@EnchantmentInfo(name="&cHealing", desc="Heal x level hearts every second!", trigger=Trigger.EQUIP)
public class.... {
I just want to make sure its good practice, because my IDE doesn't cry when I'm using static abuse
I dont know there is not really a specs for it i think
Hello, i'm trying to build m'y project with gradle
To add dependency
I try this tuto https://www.spigotmc.org/wiki/spigot-gradle/
But m'y build.gradle wont build ๐ฆ
/give @p enchanted_book{StoredEnchantments:[{id:"minecraft:mending",lvl:1}]}
unrelated, mojang did an oopsie in a recent snapshot and made piglins give soul speed books with {Enchantments:...} instead of {StoredEnchantments:...} so they couldn't be used in anvils
ez
Anyone know why I'm getting this message?
I have the jar being exported and it's in my plugin's jar file
If you reloaded, that's a common issue
org.bukkit.craftbukkit.v1_15_R1.CraftServer.reload
mother fucker
lol
๐ don't ๐ use ๐ the ๐ reload ๐ command ๐
@frigid ember enums in annotations are perfectly fine, definitely recommend in place of something like a string for constant values ๐
/stop
Delete plugin
Export & put in plugins folder
Start server
More often than not, if you're in a testing environment, you're fine to use reload. Though occasionally if you're adding new classes you may run into issues such as this while replacing your plugin on a running server
Yeah, I use reload a lot typically because it is a testing environemnt
but either way, I just did what you suggested and it still isnt working.
Lmao
the error says it's not finding a class... did you not include the class or is a dependency not installed?
It is included, and I literally have the library JAR contained within my plugin's JAR
the class path didn't change?
are you using Maven?
So i have an abstract class that implements Listener do i need to register all the child classes?
or is there a way to register all subclasses?
if that even makes sense
you need to register all instances of Listener you create
well thats a pain
you can make it register itself in the constructor ยฏ_(ใ)_/ยฏ
How can i patch holograms moving from their position when using different versions, tried with hologram-patch confim in viaversion but it just worked with 1.9
you can make it register itself in the constructor ยฏ_(ใ)_/ยฏ
Please don't :((
why not?
abstraction ig
You shouldn't have registration functionality in a constructor
ctrl+d for the win
that's the what, but I don't really understand the reasoning
constructors are meant to intialize the object, not to execute logic
Not necessarily. Sometimes it's needed
Though your code should abide by a single-purpose principle. It would be the equivalent of having your getFoo() method print a message every time it's called
public String toString() {
System.out.println("Returning: " + myString);
return myString;
}```
Any developer trying to call and access that may not want that message to be printed. That's not the purpose of the method
Is this acceptable use of static? Where I have the main class as private static
public final class Util {
private Util() {}
private static final PvPMain main = PvPMain.getPlugin(PvPMain.class);
public static String color(String s) {
return ChatColor.translateAlternateColorCodes('&', s);
}
public static int calculateLevel(List<String> lore) {
...
}
}
๐ค
How would you check the meta of a spawner before it's placed?
You should just pass the instance of your plugin over to your classes that need it @frigid ember
MyClass(MyPlugin myPlugin)
I can do that for a utility class?
@ashen stirrup get the itemstack and get the metadata
i think its returned in the blockplacevent?
It depends on what the utility is doing. Generally utils should avoid being stated
well yeah, avoiding unexpected side effects, but I don't see why registering a Listener would be a side-effect when for example constructing a self-contained unit, e.g. a Listener/ticking object that only cares for events that affect specified game objects.
Well you also have the additional side effect of throwing away your instance. An empty object construction, so to speak. new MyListener() sitting randomly in a method
Only event.getItemInHand() returns an ItemStack
So if I check their itemInHand on the place event it won't return null?
It shouldn't be null but I wouldn't assume that. Listeners may change it
Null check first
Yeah
well, I'm obviously not just creating an instance without storing it somewhereโthat would actually be foolish if I ever wanted to destroy it
But a large majority of the time, you're not assigning a listener to anything
You see the predicament here? lol
well, in that case you shouldn't let the Listener self-register ;D
You can do it in the constructor though I'll always advise against it
getItemMeta is nullable, so a null check is mandatory
is anyone here proficient with worldedit?
Me
So in theory, if the spawner's name is Creeper Spawner
String[] nameCut = displayname.split(" ");
EntityType spawnerType = EntityType.valueOf(nameCut[0]);
Would return a Creeper EntityType?
yes
Perfect
not sure if the string has to be all caps tho
It does. It's case sensitive. Though valueOf() will throw an exception if not present. I'm always in favour of Enums.getIfPresent() from Guava
@sand helm so i have a world i downloaded is it possible to replace every ore with stone then have a random generation of stone be x ore
Shaded into Bukkit, shouldn't need any additional dependencies. Returns an Optional<T>
my map is 4000 x 10000 btw
lmao big loops
does anyone know how to send a plugin message from one spigot server to another?
Enums.getIfPresent(EntityType.class, nameCut[0].toUpperCase());
Assuming that's how you use it correctly.
Not 100% sure if you need to upper case it. Let me check
@subtle blade is your username inspired by the package manager
Oh, so you can just do this
EntityType spawnerType = Enums.getIfPresent(EntityType.class, nameCut[0].toUpperCase()).or(EntityType.PIG);
or do you just like chocolate
It's case sensitive, but yes that's about how you'd use it, Jeeb
Nah, unrelated Plochem lol
Learn something new everyday ๐
lmao ok
Better than throwing an exception from valueOf(), that's for sure :D
I can imagine Enums.getIfPresent().or(); being very useful
Assuming it returns whatever is passed in .or() if it isn't present.
I wonder what is PacketPlayOutWindowItems used for
https://srcb.in/f9468039e8 I have no clue why this is not working
Are you registering your listener?
yes
public void registerEvents(){
PluginManager pm = Bukkit.getServer().getPluginManager();
pm.registerEvents(new PvpToggleCommand(), this);
pm.registerEvents(new Freeze(), this);
}
That's the case, yea. or() will be called if the Optional returned by getIfPresent() is empty
Perfect
Kind of like Map#getOrDefault(key, defaultValue)
@ashen stirrup
What all isn't working?
Any error message?
$10 says you've created two instances of PvpToggleCommand, one for the command, one for the listener
public void registerCommands(){
getCommand("pvp").setExecutor(new PvpToggleCommand());
getCommand("sc").setExecutor(new StaffChat());
getCommand("gmc").setExecutor(new Gmc());
getCommand("heal").setExecutor(new Heal());
getCommand("feed").setExecutor(new Feed());
getCommand("gms").setExecutor(new Gms());
getCommand("gma").setExecutor(new Gma());
getCommand("gmsp").setExecutor(new Gmsp());
getCommand("ac").setExecutor(new AdminChat());
getCommand("clearchat").setExecutor(new ClearChat());
getCommand("discord").setExecutor(new Discord());
getCommand("teamspeak").setExecutor(new TeamSpeak());
getCommand("Store").setExecutor(new Store());
getCommand("twitter").setExecutor(new Twitter());
getCommand("freeze").setExecutor(new Freeze());
}
public void registerEvents(){
PluginManager pm = Bukkit.getServer().getPluginManager();
pm.registerEvents(new PvpToggleCommand(), this);
pm.registerEvents(new Freeze(), this);
}
Have to remember that when you create an instance of something, its members are independent to that instance
$10 to you sir
Yep
Two options:
(1) Move the boolean value outside of your command/listener class. Whether that be the main class or whatever. Access it from there instead
(2) Create one instance of PvpToggleCommand (assign it to a variable) and register that same instance as an executor and listener
The first is preferred. Keeps your code organized and maintains a single-responsibility principle
you mean private PvpToggleCommand = new pvptoggleconnand();
(3) let the Command/Listener self-register :> (don't)

forget I said anything, it's a meta reference
whats the difference between registerEvent and registerEvents?
@subtle blade thanks so much โค๏ธ
registerEvent was the old system (before Listener and @EventHandler)
Well, I suppose Listener existed, but EventHandler did not. You can still use it for smaller event calls
In fact, I used it as an example in a bug report not long ago
okay
also, if i have a map of Parent is it possible to register all of them by looping over them?
i cant seem to get it to work
@Override
public void onEnable() {
Bukkit.getPluginManager().registerEvent(BlockPlaceEvent.class, new Listener() {}, EventPriority.NORMAL, (listener, event) -> ((Cancellable) event).setCancelled(true), this);
}```
probably because it registers the parent type instead
Does PlayerEvent not trigger @EventListner?
wait, the old event system is still in the API? o_O
How would i use the .playEffect(arg0, arg1, arg2);
ive read the docs and all but still
It does not, DarkEye. No. You cannot listen to abstract events
And yes, it's still present because it's still useable, Syd
ugh
no wonder it never got handled then
wait, how is PlayerEvent abstract
or are you talking about the subclasses
man i'm just gonna go to bed, i cant think anymore
rookie numbers
same^
Aha xD
xin chร o
ร nhแบงm cรณ ai viแปt nam k nhแป
hey guys i have a problem with my plugin
@EventHandler
public void ammoRequire(WeaponReloadEvent event) {
Player p = event.getPlayer();
Inventory inv = p.getInventory();
String g = event.getWeaponTitle();
ItemStack ammo = new ItemStack(Material.IRON_INGOT, 1);
ItemMeta meta = ammo.getItemMeta();
meta.setDisplayName(plugin.getConfig().getString("Guns."+ g +".ammo.name"));
ammo.setItemMeta(meta);
if (inv.contains(ammo)) {
p.sendMessage("You have ammo");
}
else {
p.sendMessage("You dont have ammo");
}
}
althoug i have this ammo, the plugin return message "You dont have ammo"
Do you have ammo?
You also might want to wrap that in code tags
^
Do you have ammo?
@ashen stirrup i have ammo
i dont know how to use discord code tag
Loop over the inventory instead and use Itemstack#isSimilar
System.out.println("test");
System.out.println("test");
@ashen stirrup how to do that :vv
Exactly like that lol
Loop over the inventory instead and use Itemstack#isSimilar
@harsh anvil thanks i will try
for(ItemStack item : player.getInventory()){
}
Loop like that
Wait no
player.getInventory().getContents()
thank you
After the first 3 `s add "java" for it to be colorized
So why doesn't PlayerEvent trigger @EventHandlers?
like this ?
Yes
@subtle blade Well, I got it to work. I guess it was Maven; but figured out how to setup maven and all that. My code worked first try btw lmao
It extends event so I don't see why it wouldn't
So why doesn't PlayerEvent trigger @EventHandlers?
Because it's an abstract event that can't ever be constructed. Its calls aren't propagated upwards because it has no handler list
If an event class is labelled as abstract, you can't listen to it
That's the general rule of thumb
@wheat pumice why don't you try
inv.contains(Material.IRON_INGOT)
since ammo is just iron ingots
Hmm I see. I guess that answers why I can't register a list of parent type either... That's... Really going to fuk me over :/
Is there a way to do it without having to cast everything to the child type?
Cuz I have like 33 types
That I all need to register
You would have to listen to each individual event, unfortunately. The drawbacks of the event API
Is there a way to cast "dynamicly" like cast to the classes actual type?
Or do I have to do it manually
It's unlikely you're gonna get useful information even if you could just listen to every playerevent
What does knowing that a player did an event help you without knowing anything about the event context
You'd have to instanceof and cast in that same listener anyways
I just yoinked an event from paper and they used the PlayerEvent instead of event so I stick with it. Ig it doesn't really matter in this case
Thanks :)
@wheat pumice why don't you try
inv.contains(Material.IRON_INGOT)since ammo is just iron ingots
@pastel basin i need the ammo have a name
Check the name after
oh, I don't know why Inventory#contains(ItemStack) isn't working there, so just do what @ashen stirrup said then
๐
{
"name": "?3Immortal ?eHelmet",
"material": "DIAMOND_HELMET",
"amount": 1,
"lore": [
"?3Immortal"
],
"enchants": {
"unbreaking": 3,
"protection": 3,
"aqua_affinity": 1
}
},
``` Having a small issue with JSON deserialization. The chatcolor gets replaced with a question mark. Has anyone stumbled across this issue before?
@velvet halo are you encoding the file as UTF-8? that is necessary for the section symbol to save properly.
(and is the reason people often use & instead)
I am using &
public void write(String name, T t) {
try {
File file = new File(directory + File.separator + name + ".json");
if(!file.exists()) file.createNewFile();
try (Writer writer = new OutputStreamWriter(new FileOutputStream(file), StandardCharsets.UTF_8)) {
writer.write(gson.toJson(t));
writer.flush();
} catch (IOException e) {
e.printStackTrace();
}
} catch (IOException e) {
e.printStackTrace();
}
}
``` Alright yeah that fixed it
Thanks for the help
np!
Hi! can someone help me? Because i installed ChestShop, and when I touch the sign instead of buy the product, i open the chest
how do i disable phantoms from spawning in
Isnโt it like /gamerule doInsomniaCycle false?
how can i move player crosshair without using teleport
Probably modifying it directly :p
How do I make a "virtual furnace" obtained from the "TileEntityFurnace" class work? , because even if I put meat and coal on it, it doesn't work.
how can i move player crosshair without using teleport in bukkit code
Asking about your attempted solution rather than your actual problem
u guys got some tips for a prison rank plug-in except EZRanksPro
@sand helm i was saying about how he could modify yaw pitch directly
btw how does one sets a fixed size for a jtextfield button?
it keeps pushing my last button off the screen
Why can't i use both version's nms code?
How can I get an NBTTagCompound from a map?
Should I use reflection? to use the private constructor?
Yes I think you have to
@fleet burrow I do not know what you are trying to achieve, and I have never used this library, but it looks like it might be what you are looking for https://github.com/tr7zw/Item-NBT-API
How can I setup logger groups in Spigot default logger ?
I need to enable logging of org.hibernate.tool.hbm2ddl
Can someone send me an example use of NBTCompressedStreamTools.a with NBTTagCompound as one of the arguments
for 1.15
help
[04:33:32] [Server thread/ERROR]: #!#!
[04:33:32] [Server thread/ERROR]: #!#! Version Information:
[04:33:32] [Server thread/ERROR]: #!#! Skript: 2.4 (OUTDATED)
[04:33:32] [Server thread/ERROR]: #!#! Flavor: skriptlang-github
[04:33:32] [Server thread/ERROR]: #!#! Date: 2019-11-30
[04:33:32] [Server thread/ERROR]: #!#! Bukkit: 1.15.2-R0.1-SNAPSHOT
[04:33:32] [Server thread/ERROR]: #!#! Minecraft: 1.15.2
[04:33:32] [Server thread/ERROR]: #!#! Java: 1.8.0_231 (Java HotSpot(TM) Client VM 25.231-b11)
[04:33:32] [Server thread/ERROR]: #!#! OS: Windows 10 x86 10.0
[04:33:32] [Server thread/ERROR]: #!#!
[04:33:32] [Server thread/ERROR]: #!#! Server platform: Spigot
[04:33:32] [Server thread/ERROR]: #!#!
[04:33:32] [Server thread/ERROR]: #!#! Current node: null
[04:33:32] [Server thread/ERROR]: #!#! Current item: format a gui slot [[long:0]] of the player with ([[itemtype:black stained glass pane]] named "ยบ7" >> ch.njol.skript.classes.data.DefaultConverters$13@1c41465: itemtype -> itemstack)
[04:33:32] [Server thread/ERROR]: #!#! Current trigger: command /kit (simple event) (kits.sk, line -1)
[04:33:32] [Server thread/ERROR]: #!#!
[04:33:32] [Server thread/ERROR]: #!#! Thread: Server thread
[04:33:32] [Server thread/ERROR]: #!#!
[04:33:32] [Server thread/ERROR]: #!#! Language: english
[04:33:32] [Server thread/ERROR]: #!#! Link parse mode: DISABLED
[04:33:32] [Server thread/ERROR]: #!#!
[04:33:32] [Server thread/ERROR]: #!#! End of Error.
[04:33:32] [Server thread/ERROR]: #!#!
when i reload kits.sk
tit shows no error
Skript is not supported here
go to the skript discord
wat is it
google it
Anyone from the dev team able to tell me how i can bind my darn remote debugger to debug NMS code
Hi. Is there a way to "maven install" a JAR file of a plugin right into D:\MyServer\plugins\ folder? Now I gotta copy the JAR file from PluginProject\target folder. It works, but it's a little annoying.
Maybe there's a way to copy the JAR from the target folder?
Is it just me, or is the update checker running a bit slow. I've updated my plugin twice (to fix some stuff) and the spigot checker still sends a message about there being an update even though they download the newest version from the plugin page, they still get the "there is an update" message..
Are you using Spiget for update checking?
@stone oxide you can make a .bat file for that tho
He is on windows
build + move
Using the update checker from the Spigot Wiki - Yes, i'm using the https like in md_5's post.
ok
Hm, then I dont know. I know that the Spiget API is really slow in updating
@stone oxide you can make a .bat file for that tho
@solemn grove I added 'xcopy from to /y' command into my server launch bat! That'll do I guess
How would I go about serializing an NBTTagCompound?
I tried getting it's map and serializing it but then I get an exception that I can't cast x to NBTBase when constructing NBT from a map
That's the error
Looks like you need to create a new instance of NBTBase / NBTTagCompound. How? I dont know. But these classes are obviously not subclasses of a LinkedTreeMap
So casting them wont work
I'm pretty sure there is a method for converting json to nbt
first use gson to serialize the map, then convert that json to nbt
yall talking about itemstack NBT or tileentity NBT
Hey guys, I'm developing a plugin where I'll be accessing a database. I know that for performance reasons it's best to do this asynchronously but I need one task, one to check if something already exists in a mysql database, to return a true or false. I know this should be done using callbacks, but I'm having trouble understanding how that works. The explanations i found online also don't bring much clarity, they pretty much just say "do x and y to make callbacks" which doesnt explain much in how it functions
hi guys, can someone please recommend a simple tablist plugin that works on 1.15.2?
I use vanilla teams for colors and prefixes, so I don't want the plugin to modify that, all I want is a customizable header and maybe footer
@half marsh Basically you say to your friend to calculate 9*2, he thinks for a little bit and then gives you answer.
You - Main thread
Friend - other thread (async)
Answer - callback
Something like this ๐คทโโ๏ธ
callback is more like your request to tell you the result
So if I understand right I start an async task where it checks if a row already exists in a table and the callback would be the task running a function back on the main thread where the code continues, kind of
where it feeds the result of that sql check to that function
If you do something like: callback.result(exists), this function will be called in async. If you would like to make it on main thread, you would need to do something like this:
new BukkitRunnable() {
@Override
public void run() {
callback.result(exists);
}
}.runTask(plugin);
Wew use BukkitScheduler please
what's the difference
BukkitTask task = Bukkit.getSheduler().runTask(plugin, () ->{ //code without });
Lambdas
Is one
And Iโd say Runnable over BukkitRunnable
Guys, how to get material from something like that "minecraft:lapis_lazuli" ?
I got null from this
Maybe try to remove minecraft: first
pretty sure you'd need to use NMS
translating minecraft item names to bukkit materials
Materials can be grabbed by Material.matchMaterial or Material.valueOf dependent on version but what version @static zodiac.
sometimes bukkit material names are different from minecraft item names, especially when using <1.13
How can I serialize NBT?
you might want to save yourself a lot of work and just use https://www.spigotmc.org/resources/nbt-api.7939/
nah
How do I disable spark from constantly telling this:
[14:59:51] [Craft Scheduler Thread - 960/INFO]: [โก] Tick #1276797 lasted 135.71 ms. (21.04% increase from avg)
ยฏ_(ใ)_/ยฏ
ยฏ_(ใ)_/ยฏ
A question, CMI or EssentialsX ๐
Redfox essentialsx
why?
im just very used to essentials cant see myslef using anything else
Anyone here knows when the crafttileentity interfaces are created
im hitting like 5 walls at the same time and im going slowly mad
How do I disable spark from constantly telling this:
Suggestions?
[14:59:51] [Craft Scheduler Thread - 960/INFO]: [โก] Tick #1276797 lasted 135.71 ms. (21.04% increase from avg)
@fleet burrow you need to write a lot xd https://gyazo.com/a4041e489bb7d0dd511efb16aa56ebfd
@cloud sparrow 1.15
NBTTagCompound
Who said I don't code?
It was pretty obvious you code? Wym
yes
Is there a way to sudo a user to do a command (like player.chat(cmd);) without firing a PlayerCommandPreprocessEvent event?
I have an idea to make a global flag, turn it off before executing a command and turning it on afterwards, and in the event if the flag is turned off, then skip the code in the event handler, but that sounds like a dirty workaround.
@fleet burrow you need to write a lot xd https://gyazo.com/a4041e489bb7d0dd511efb16aa56ebfd
@crystal trench Pretty sure you could just use recursion for NBT Tags
Hey guys. I'm developing my own plugin. write event. and no any suggestion that getPlayer in PlayerJoinEvent. Sorry for my Enlgish.
What IDE are you using?
IntelliJ IDEA
Did you include the javadoc jar in the project settings?
yes PlayerJoinEvent is available on tab suggesion
BUT no event. suggestion
Oh! I got it this was problem, @EventListener !
Can someone help me?
My plugin uses log4j as logger and this is my config:
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.Target=System.out
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n
I want to output everything to Minecraft console, how can I do that? System.out doesn't work
Can someone help me with colour coded names?
String[] nameCut = displayname.split(" ");
System.out.println(nameCut[0]); // Outputs "ยบe<SPAWNERNAME>" e.g "ยบeBLAZE"
EntityType spawnerType = Enums.getIfPresent(EntityType.class, nameCut[0].toUpperCase().replace("ยบe", "")).or(EntityType.PIG);
The ยบe is stopping the code from working since it gets the spawner type from the first word of the spawner name.
ChatColor.translateAlternateColor('&', message)
Actually don't worry, fixed it
How do i detect if the fishing hook hit a block ?
and if the player's fishing rod is in state deployed or retracted ?
I don't know in which event
Oh i think i got it
EntityInteractEvent
which has a getBlock() method
But now how can i check who the hook belongs to ?
Hello lovely spigot people! I have some frustration that you may be able to help me with. I'm trying to set up some /scoreboard stuff on my server, but for some reason the color option and nametagvisibility option does not actually apply, on my spigot server. So far I don't really have plug-ins except some basic Skript plug-ins, but no skripts yet.
Is scoreboard nametag changes somehow not working in spigot 1.12.2?
is there a button or lever or source on top or behind the joining walls? Torch below?
redstone torches below? repeaters?
what's behind and under the sand
there has to be something because it's powered
oh I see
Let me talk.
and the repeaters are pointing away, right?
The repeater is pointing into a block where redstone is right next to it
ah yes
yea
Fixed.
Still problem
Let me
Explain
my system.
Basically its a system for a store which checks if a person drops a diamond into the hopper
18 Diamonds are in the hopper
- 4 random blocks
So its 22
and once its 23
It activates a 2-block redstone
Which activiates the comparator
And the comparator Unlocks the hopper
So it can drop that one diamond.
THen locks it back.
Basically.
The redstone that is unlocking the hopper.
Activiates forever.
And never deactiviates
It only updates if I destroy a redstone from it.
@sour dock
nvm
Please? Anyone that can answer if spigot somehow overrules the nametag options for /scoreboard? I'm using the teams to make the nametags disappear over players' heads. It works on a lan world, but for some reason not on the spigot server?
How do I disable spark from constantly telling this:
Suggestions?
[14:59:51] [Craft Scheduler Thread - 960/INFO]: [โก] Tick #1276797 lasted 135.71 ms. (21.04% increase from avg)
hey guys, any tutorial with jedis?
i need to communicate all spigot servers
@lapis dune download buildtools and run
Ok thxs
hubkick plugin
Btw guys when I say /scoreboard I mean the vanilla command. Not the plug-in that apparently exist..
Can someone help me with this? https://www.spigotmc.org/threads/algorithm-for-finding-structure-starting-point.429833/
1.8 ๐คฎ
@frigid ember This is spigot for paper support go to their discord
If I create a scoreboard and then the server restarts will the scoreboard still exist?
is it the built in vanilla /scoreboard command?
No, I create it via the Bukkit API
Okay
does keep chunks loaded save perfomance???
1.12.2 PAPER
@zenith siren I think it will But it might be buggy.
Hello, Slade. Welcome to the Spigot server
@frigid ember if you're referring to Paper's keep-spawn-loaded option, afaik it only makes a difference if people die and respawn at the world spawn.
if you set it to false, you'll save a bit of memory when nobody's at the world spawn, at the cost of having to load the chunks again if anyone respawns there
HELLO KONSOLAS, WELCOME TO THE SPIGOT SERVER
chill choco
We really should start kicking people for support with forks though ยฏ_(ใ)_/ยฏ
is it that big of a deal?
We are quite obviously not Paper. Not sure how much clearer it can be
Given the "Spigot" icon, the "SpigotMC" server name
The "Spigotcraft" server channel
Don't care if people use it. Use what you feel best suits your server. Though if you're seeking support, it should be at the point of support that actually maintains the software
Not the upstream that has no knowledge of what changes downstream makes
It's really not that difficult
Are you considering kicking people for asking support with Paper or giving help with Paper?
it is broadly the same community though - stuff posted in this server isn't necessarily targeted at the maintainers of spigot, but to the community in general
and yeah, kicking people seems unnecessarily combative
But use some common sense at least. Why should we be holding the weight of something that does not have anything to do with us
Literally click to another server and ask your same question
Right, a kick seems excessive for a misunderstanding, though.
The alternative is deleting messages and having chat flooded with "why did you delete my message" and a repeat of the question
You can join back after a kick
Ah I was thinking ban, not kick
Besides - I said we should start, not that we will. That's a decision to be made by md, not me
Also can we start warning people for asking help outside of help channel
im tired of seeing people with stupid question
also FAQ channel or pinned message would be nice
Its a honor ill get started
You were saying? 
I'm a bit of a bully, yea
i thought Canadians where supposed to be nice
We are! 90% of the time ๐
it all gets bottled up
Yea, and then some poor individual rubs us the wrong way and it all gets unleashed on them
Though we say sorry after
Fun fact: Sorry has so many different meanings in Canada ranging from "dude, it was your fucking fault, dick..." to "i'm so sorry, i didn't mean it, eh"
Hi.
I have a problem
I turned off my server and after starting i get this error
Failed to schedule load callback for chunk [-12, -18]
java.util.concurrent.CompletionException: java.lang.NullPointerException
Any ideas?
What could cause this?
sending dum packets
packet loss or corruption typically
Possibly a corrupted chunk @vernal basalt?
Did you stop it, or did it crash?
and how can i fix this?
turn on client debug logged and see which packet caused it
I stopped it
back to chocos point
paper even said
"we are not spigot dont equate us with them"
like why should we do the same
makes sense
ยฏ_(ใ)_/ยฏ
Itโs like someone asking for crates reloaded support in crazy crates help
Which happens more often than one might think
> [19:40:40] [Spigot Watchdog Thread/ERROR]: ------------------------------
> [19:40:40] [Spigot Watchdog Thread/ERROR]: The server has stopped responding! This is (probably) not a Spigot bug.
> [19:40:40] [Spigot Watchdog Thread/ERROR]: If you see a plugin in the Server thread dump below, then please report it to that author
> [19:40:40] [Spigot Watchdog Thread/ERROR]: *Especially* if it looks like HTTP or MySQL operations are occurring
> [19:40:40] [Spigot Watchdog Thread/ERROR]: If you see a world save or edit, then it means you did far more than your server can handle at once
> [19:40:40] [Spigot Watchdog Thread/ERROR]: If this is the case, consider increasing timeout-time in spigot.yml but note that this will replace the crash with LARGE lag spikes
> [19:40:40] [Spigot Watchdog Thread/ERROR]: If you are unsure or still think this is a Spigot bug, please report to https://www.spigotmc.org/
> [19:40:40] [Spigot Watchdog Thread/ERROR]: Be sure to include ALL relevant console errors and Minecraft crash reports
> [19:40:40] [Spigot Watchdog Thread/ERROR]: Spigot version: git-Spigot-800b93f-8160e29 (MC: 1.15.2)
Great
[19:40:50] [Spigot Watchdog Thread/ERROR]: Current Thread: luckperms-scheduler-worker-137
> [19:40:50] [Spigot Watchdog Thread/ERROR]: PID: 382 | Suspended: false | Native: false | State: TIMED_WAITING
> [19:40:50] [Spigot Watchdog Thread/ERROR]: Stack:
> [19:40:50] [Spigot Watchdog Thread/ERROR]: sun.misc.Unsafe.park(Native Method)
> [19:40:50] [Spigot Watchdog Thread/ERROR]: java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215)
> [19:40:50] [Spigot Watchdog Thread/ERROR]: java.util.concurrent.SynchronousQueue$TransferStack.awaitFulfill(SynchronousQueue.java:460)
> [19:40:50] [Spigot Watchdog Thread/ERROR]: java.util.concurrent.SynchronousQueue$TransferStack.transfer(SynchronousQueue.java:362)
> [19:40:50] [Spigot Watchdog Thread/ERROR]: java.util.concurrent.SynchronousQueue.poll(SynchronousQueue.java:941)
> [19:40:50] [Spigot Watchdog Thread/ERROR]: java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1073)
> [19:40:50] [Spigot Watchdog Thread/ERROR]: java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1134)
> [19:40:50] [Spigot Watchdog Thread/ERROR]: java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
> [19:40:50] [Spigot Watchdog Thread/ERROR]: java.lang.Thread.run(Thread.java:748)
> [19:40:50] [Spigot Watchdog Thread/ERROR]: ------------------------------
> [19:40:50] [Spigot Watchdog Thread/ERROR]: Current Thread: luckperms-scheduler-worker-135
Current Thread: Netty Epoll Server IO #3
> [19:40:50] [Spigot Watchdog Thread/ERROR]: PID: 200 | Suspended: false | Native: false | State: RUNNABLE
> [19:40:50] [Spigot Watchdog Thread/ERROR]: Stack:
> [19:40:50] [Spigot Watchdog Thread/ERROR]: io.netty.channel.epoll.Native.epollWait0(Native Method)
> [19:40:50] [Spigot Watchdog Thread/ERROR]: io.netty.channel.epoll.Native.epollWait(Native.java:114)
> [19:40:50] [Spigot Watchdog Thread/ERROR]: io.netty.channel.epoll.EpollEventLoop.epollWait(EpollEventLoop.java:239)
> [19:40:50] [Spigot Watchdog Thread/ERROR]: io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:256)
> [19:40:50] [Spigot Watchdog Thread/ERROR]: io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:884)
> [19:40:50] [Spigot Watchdog Thread/ERROR]: java.lang.Thread.run(Thread.java:748)
> [19:40:50] [Spigot Watchdog Thread/ERROR]: ------------------------------
> [19:40:50] [Spigot Watchdog Thread/ERROR]: Current Thread: Netty Epoll Server IO #2
And many more
Any suggestions for fixing?
luckperms-scheduler-worker-135
also this:
So I need to use Paper?
K
[13:41:16 WARN]: at com.zaxxer.hikari.pool.HikariPool.createTimeoutException(HikariPool.java:689)
[13:41:16 WARN]: at com.zaxxer.hikari.pool.HikariPool.getConnection(HikariPool.java:196)
[13:41:16 WARN]: at com.zaxxer.hikari.pool.HikariPool.getConnection(HikariPool.java:161)
[13:41:16 WARN]: at com.zaxxer.hikari.HikariDataSource.getConnection(HikariDataSource.java:100)
[13:41:16 WARN]: at com.Blackveiled.Diablic.Database.Database.getConnection(Database.java:187)
[13:41:16 WARN]: at com.Blackveiled.Diablic.Database.Database.prepareStatement(Database.java:162)
[13:41:16 WARN]: at com.Blackveiled.Diablic.WarpManager$1.run(WarpManager.java:110)
[13:41:16 WARN]: at org.bukkit.craftbukkit.v1_15_R1.scheduler.CraftTask.run(CraftTask.java:81)
[13:41:16 WARN]: at org.bukkit.craftbukkit.v1_15_R1.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:54)
[13:41:16 WARN]: at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
[13:41:16 WARN]: at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
[13:41:16 WARN]: at java.lang.Thread.run(Unknown Source)
[13:41:16 WARN]: [Diablic] Plugin Diablic v1.0 generated an exception while executing task 54
java.lang.NullPointerException: null```
Anyone know why HikariCP is not returning connections back to the pool? I'm closing out my connections after I send queries; I ran up to 50 connections on my pool to test this out and after I run around that many queries I no longer have connections I can access anymore.
Example:
if (isConnected()) {
Bukkit.getScheduler().runTaskAsynchronously(plugin, new Runnable() {
@Override
public void run() {
try {
Connection connection = preparedStatement.getConnection();
preparedStatement.execute();
connection.close();
} catch (SQLException e) {
e.printStackTrace();
}
}
});
}
}```
and yes, this is retrieving the Connection from the HikariDataSource.
Just a thing
Bukkit.getScheduler().runTaskAsynchronously(plugin, new Runnable() {
@Override
public void run() {
Idk if this is possible but a public void in a Overrided public void
I have never seen that.
:/
Anonymous classes
Either way, it still works. The queries are executed properly within.
I'm just having issues with the connection closing and being placed back into the pool.
What you mean Choco
Explaining Thijssie's confusion. It's valid. Overriding a method in the Runnable implementation
Yeah, it doesn't matter if it's public void or not, it's overriding a method.
Close the statement as well. In fact, you don't need to close the connection explicitly because closing the statement will close the connection
preparedStatement.execute();
preparedStatement.close();```
Also, in this case, a lamba will work a little nicer
Bukkit.getScheduler().runTaskAsynchronously(plugin, () -> {
preparedStatement.execute();
preparedStatement.close();
});```
Quick and easy
I'll give it a shot; one sec
player.setRemainingAir() will not do anything if I set EntityAirChangeEvent to canceled for a player (or overall), the only reason I do set it as cancelled is because I want to take over all control over air regain and air loss from the game. If I do not set is as cancelled. things kinda work but don't work out as I want them to as the math get's effed up. So is there a better way to do this so setRemainingAir works while also preventing minecraft from using it's own stuff for the air loss and regeneration? Basically I think it's far to easy to dive underwater in the game.
Hey guys, can I have an enum with enum values inside
IRON_ARMOR,
LEATHER_ARMOR,
CHAIN_ARMOR(Material.CHAINMAIL_CHESTPLATE, Material.CHAINMAIL_LEGGINGS, Material.CHAINMAIL_HELMET),
SWORD(Material.IRON_SWORD, Material.WOODEN_SWORD),
DIAMOND_SWORD(Material.DIAMOND_SWORD);
private Material[] materials;
EnchantMat(Material... mat){
this.materials = mat;
}
public Material[] getAllMaterials() {
return materials;
}
}
e.e
Though if you're checking contains frequently, I think an EnumSet would be preferred rather than a Material array
Sets.immutableEnumSet(mat)
For what?
public enum EnchantMat {
IRON_ARMOR,
LEATHER_ARMOR,
CHAIN_ARMOR(Material.CHAINMAIL_CHESTPLATE, Material.CHAINMAIL_LEGGINGS, Material.CHAINMAIL_HELMET),
SWORD(Material.IRON_SWORD, Material.WOODEN_SWORD),
DIAMOND_SWORD(Material.DIAMOND_SWORD);
private Material[] materials;
EnchantMat(Material... mat){
this.materials = mat;
}
public Material[] getAllMaterials() {
return materials.clone();
}
}
So it would look like this instead
There's two reasons an EnumSet would be better here
- If you create one that's immutable (i.e. from Guava), it's unchangeable when fetched from a method
- Its calls to
#contains()are significantly faster because it holds constants in a bit vector. O(1) operation
Truly no clue what I did wrong
@subtle blade , so it would look like this?
public enum EnchantMat {
CHAIN_ARMOR(EnumSet.of(Material.CHAINMAIL_CHESTPLATE, Material.CHAINMAIL_LEGGINGS, Material.CHAINMAIL_HELMET)),
DIAMOND_SWORD(EnumSet.of(Material.DIAMOND_SWORD));
private ImmutableSet<Material> materials;
EnchantMat(EnumSet<Material> mat){
this.materials = Sets.immutableEnumSet(mat);
}
public ImmutableSet<Material> getAllMaterials() {
return materials;
}
}
Yes, though unless you're iterating over those materials, it would probably be better to just have a method that returns a boolean if the set contains the constant
Alright thanks
public boolean includes(Material) or whatever
And finalize the materials field! ๐
Ok
i think you can also move the EnumSet.of to the constructor
and make the argument Material...
Oh I hadn't even noticed that, yea. If you just make varargs
Hello, Can someone help me implement "HikariCP" to my plugin, which already has MySQL? However it is made precariously
Do you have Vault installed Digger?
they give examples on their wiki
it's basically case of calling getConnection() on the datasource object when you wanna run some sql
Can someone explain this to me?
How come if this extends ItemStack
hello, I want to disable the list of commands in the chat for the players of my server and they cannot see them, in spigot.yml I changed the TAB-COMPLETE to -1, it is deactivated, but now a message appears while I type the command and it is " Unknown command for position: 1 "and it's kind of annoying, if someone could help me remove it I would appreciate it too much
How do you cancel ExpDrop from Spawners?
BlockBreakEvent#setExpToDrop(0)?
Doesn't seem to be a method.
1.15.2
Is it possible to change an ItemStack's NBT without creating a copy of it?
Ehm, sure. ItemStacks are mutable. Though you have to re-set it in the inventory once you've changed it
that is a method https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/event/block/BlockExpEvent.html#setExpToDrop-int- @ashen stirrup
Copies of items are made when fetched from NMS
Man. ItemStack really should have been an interface, huh? lol
Oh, BlockExpEvent
which BlockBreakEvent subclasses.
Yes. setExpToDrop() is inhereted from BlockExpEvent


