#help-development
1 messages · Page 1389 of 1
this will also install a dependency locally with the artifact-id spigot instead of spigot-api
ooof
speed
lmao
Then play with things. remove your relocations and see if it exports with hikari then. You don;t need to start the jar, just look inside for com.zaxxer
theres nothing wrong with the artifactset as it shades just fine here.
okey le me try for buildtools
removed relocations
same thing
You have somethign funky going on then
Yeah i got no idea
I'm using Eclipse but that shoudl make no difference
i could hop in a vc and screenshare maybe but idk if that would take up too much of your time
Should I wait on this screen or turn it off?
Sorry, this is the first time I've used it xD
I'm off to bed soon so won't have time I'm afraid
ah, it's being installed
no worries
@bright jasper how are you defining the includes for your shade plugin ?
maybe it is a formatting issue
is there a way to restore a percentage of health and not a hard value?
So when I create a pex group what do I do to make this work, sorry for the trouble but this is an old plugin and I want it to work again
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.2.4</version>
<configuration>
<artifactSet>
<includes>
<include>com.zaxxer:HikariCP:*:*</include>
</includes>
</artifactSet>
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
</execution>
</executions>
</plugin>
yeah ehm. that is not how you define an include is it
^ that works fine
still useless hto
its to include a whole or partial package
That defines what is included
you know there is minimizeJar for that
Not needed when you have ArtifactSets
which removes the packages and classes not referenced in your code base
😂
must be one hassel to maintain
did you guys check the mvn package output ?
Yes, but teh artifactSet allows inclusing of Bungee config to use in Spigot.
Single config code base
okay, but answer le question please xd
did you guys look at the mvn package output
No clue, not my issue
He checked the jar and says its not in there so I guess its not
@eternal night
Welp @bright jasper does your mvn package output a) show that the shade plugin is called and b) show that the respective artifact is included
I didn;t get to logs. I just finished testing it worked here
I installed buildtools, and it closed after a long cmd screen. What do I start the server with xD
the folder should now contain a spigot jar
nope, but generated files here
omg did you run that in your sever folder
ok so actually
get player object
get name()
when i run package on myriadcommon it works
but in the plugin its not found
does not make sense
are you looking at the correct jar?
minecraft_server-1.16.5?
^ yeah would be have been my next guess
maybe the jar is not correctly copied or something
@gaunt eagle the file should live in your server folder then I guess xD
sht
tho I would suggest cleaning up the files generated by build tools
looking at MyriadCommon
oh lul wait
that wasnt meant for me sorry
WAIT WHAT
it was riku
I'll copy it from there, shouldn't I put it in the server folder?
yes
xD
idk man, build tools creates a spigot-1.16.5.jar or something
when you run it
it should now be in the folder you ran it in
Can I completely delete it and start it in a different folder xD?
probably furkan xD
but uh so i looked into the jar generated by mvn package and it works
but then in intellij i click run and it builds the jar and debugs it
I
it makes perfect sense
oof, lets hope elgar is asleep xD
poor dude spend so much time
just for this to be the issue
IntelliJ is not Maven
what is the issue though
(unless configured as such)
its configured as such
So basically
but please don't do it the way I do xD
ah
so your issue is most likely in that workflow
not at all in your pom specifications
concerning that mvn package produces a correct jar
yep
yeh
check the error log
different folder on my desktop
@bright jasper so, mvn package produces a target/MyriadSpigot.jar jar that contains the hikaricp package but the workflow you use through intellij does not.
yeah it makes no sense
unless its copying the wrong thing
perhaps actually
its caching the maven result or something so it stores what the dependencies are in a list and doesnt update then
that would... make sense actually holup
this is why i stopped using intellij before lmao
👀
@eternal night is that correct now xD?
yus
there is your jar
btw @eternal oxide I know you went to sleep just wanted to apologise for saying your partial package include was useless! Didn't know the syntax before and got a bit defensive, hope it didn't hit too personal! After thinking a bit over it I can definitely see the use case. Might also work well with like apache commons!
?bt
The home of Spigot a high performance, no lag customized CraftBukkit Minecraft server API, and BungeeCord, the cloud server proxy.
soz cbf googling it lol
interesting how some windows commands dont work from other drives
very
I have 1Gb on my main drive
so i cant run bts on it
and BT doesnt work on other drives
so i msorta stuck lol
maybe I'll manually import the jar with mvn
Does PlayerFishEvent.getHook().getLocation() return the block where the hook is in or the block its "attached" to?
I replaced the file with the original, but I still got this error -_-
probably exact loc, not a block loc
I figured so. That makes things more complicated lol. Thanks.
well you now have the ground work
now you gotta actually fix your dependency
so instead of your system path bs
you just plug in:
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot</artifactId>
<version>1.16.5-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
well yes
my brain is burning
but now the compile warning should be gone
lol
that was the entire point
none of what we did had anything to do with the error
yeah xD
Well, I guess back to the question: "Why remove the textures properties like that"
you upset me
you could just use PropertiesMap#removeAll("textures")
That's how it was used in my training video
can you tell me what #'s mean ^^
oh like
I'm new at this sorry
String#toUpperCase basically just means I want you to use the toUpperCase method on a string instance
it is the notation for javadoc references
so you in your case I was suggesting to use the removeAll method
Yeah, # separates static methods from instance methods in code examples
basics+
the only reason you need line 32 is to pass the property into line 33
so, you mean propertyMap.removeAll("textures");
right?
ye
anyone got a quick util to get UUID from name and vice versa from mojang api
Jetbrains Academy rains supreme
@ripe marlin This training is included in java basics
one time
So I recommend this course
^^ alternative
Is there a way with Bungeecord to disable forwarding component messages from the game server to the client? I am trying to make a system that "hides" that "isolates" a player while they're interacting with it.
If I remember correctly, the price should be $ 4
I guess try something like Protocolize. Basically packet listener for bungee cord
.teleport(<Location>) teleports at feet location right?
yes
👍
Dang, was kinda hoping not to have to use another library, but thats fine.
well yes
you now remove that line
because it is useless xD
that was the entire point of this lol
32 ??
The most important line is
try jetbrains academy then :>
30 free trial or generally free if you have a student account
which you can apply for with basically any school email address
I think Udemy had a general discount when I bought it
You get the entire jetbrains product line up for free
if you get their student licence
I mean, huge difference between java basics and anything like a game
also damn, its nearly 4 am xD that is some dedication
In our country, the state has published a website called BTK Academy, and on this website, all kinds of training kits related to technology are provided free of charge. I learned from there
Is there no such thing in your country?
|| just go with Jetbrains Academy, it is lit and in the best IDE on the market ||
@eternal night did you remember??
We had an unsolved problem xD
How to sets skins xD?
your line 32 is literally just Property property = propertyMap.getProperties("values").iterator().next() no ?
oh
propertyMap.put("textures", new Property("textures", "x", "x"));
180 hours is a pretty strong assumption xD just give it a go
just remove the line I pasted above
xD
like the iterator().next() line
this one (marked as line 32 on the screenshot you sent)
Do you really want me to put this away?
asdoasdğadasd
intellij even tells you the variable isn't used
your fault for being on hour ahead xD
The code briefly deletes players ' existing skins and replaces them with the specified skin
yes I get that
xD
Can you paste the current sample
of your method
just what you currently have
and please not as a screenshot xD
I have to fast for Ramadan, eat and be right back. XD stay here for 10 minutes ^^
WAIT
yeah no worries xD I understand that feeling xD
ITS WORKED
🥳
no problem xD just know that this change only works because it is in the onJoin
after that when the client is all initialised you would need quite a bit more code to make it work and sync the clients
but for now, enjoy your drinks and food while the night is still young
PrepareItemCraftEvent#getInventory()#getMatrix()
xD ❤️
Failure to find io.papermc:paperlib:pom:1.0.4 in https://hub.spigotmc.org/nexus/content/repositories/snapshots/ was cached in the local repository, resolution will not be reattempted until the update interval of spigotmc-repo has elapsed or updates are forced
I am trying to add EssentialsX as a dependency
what specific addition to the pom.xml are you making ?
<repository> <id>ess-repo</id> <url>https://ci.ender.zone/plugin/repository/everything/</url> </repository> <repository> <id>paper-repo</id> <url>https://papermc.io/repo/repository/maven-public/</url> </repository>
and
<dependency> <groupId>net.ess3</groupId> <artifactId>EssentialsX</artifactId> <version>2.17.2</version> <scope>provided</scope> </dependency>
Should just take null
Try material.air
well setResult isn't even a thing
isn't even a thing 😦
?jd
package index
It’s event.getInventory.setResult
k thanks
How do I get the item stack from a specific slot in an inventory
like I give the code a slot number to look at
Inv.getItem(slot)
ok
I wonder if it would be rude if I just answered ?jd to all these simple questions
ill try to be less dumb with questions, but i didn't know where this one would be in javadocs
yall are mean
😢
👉🏿 😄 👈🏿
Javadocs exist for a reason ¯_(ツ)_/¯
this and alot of communities have the problem of "typical" developers
the real issue is that they are asked the same questions so much they get tired of writing out responses 😄
But i'm sure if we all wrote something like Hey, just to let ya know, these are all on the javadocs, it's got everything ya need just search for it. or If your IDE supports autofill it can do most of the work for ya
then it would be cooler
or if the ?jd command did it
lol it's fine
Im having a hard time finding a descriptive name for this method. Any suggestions?
descriptiveNameForMethod()
findPotentialSlots idk
addItemVirtually to represent that it does not affect the actual inventory
I should def add that info to the docs
thats a cool method
does anyone know why this isnt working?
p.addPotionEffect(new PotionEffect(PotionEffectType.NIGHT_VISION, 999, 255, false, false));
it just tells me the plugin is already initialized
Sounds like you created an instance of your JavaPlugin. You cant do that.
y'all are mean
you should see enginehub
i only have one class in my plugin
The show it ^^
if i remove it then my plugin just doesnt work
do you have another copy of the plugin in your plugins folder?
package xyz.skygamez.argonfullbright;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerJoinEvent;
import org.bukkit.plugin.java.JavaPlugin;
import org.bukkit.potion.PotionEffect;
import org.bukkit.potion.PotionEffectType;
public final class Argonfullbright extends JavaPlugin implements Listener {
@Override
public void onEnable() {
// Plugin startup logic
System.out.println("test");
getServer().getPluginManager().registerEvents(new Argonfullbright(), this);
}
@Override
public void onDisable() {
// Plugin shutdown logic
}
@EventHandler
public void onPlayerJoin(PlayerJoinEvent event) {
Player p = event.getPlayer();
p.addPotionEffect(new PotionEffect(PotionEffectType.NIGHT_VISION, 999, 255, false, false));
}
}
no
sorry im a noob at coding
Hey so ive been struggling with this for some while now, when i spawn an entity i sometimes have a spider, zombie etc and want to be able to set the zombie to be a baby when the spawned entity is a zombie entitytype
Sorry idk how yo explain it very well btw, open for any questions of course
Entity entity = // spawn the entity with spawnEntity() or spawn()
if (entity instanceof Ageable) {
((Ageable) entity).setBaby();
}```
Oh its that easy???
Nice nice thanks! Ill try when ill be able to
Will do! This will solve a lot of issues, basically making a system where i create mobs in a big list so i can do a custom spawn(mobs.farmerzombie) or spawn(mobs.forestspider) so that's why i needed that!
Yeah that will cover anything that can be a baby. Pigs, sheep, cows, etc.. and in your case, zombies
And the farmerzombie could be a baby but in the case of a spider i wouldnt be able to access setBaby of course, thanks a lot for that one! Was the last piece to the puzzle

@EventHandler
public void onVoid(PlayerMoveEvent event) {
if(event.getPlayer().getLocation().getY() > 0) return;
event.getPlayer().teleport(event.getPlayer().getWorld().getSpawnLocation().clone().add(0, 1, 0));
event.getPlayer().setVelocity(new Vector(0, 0,0));
}``` Any reason why this still kills the player one they are teleported?
trying to stop fall damage
Set the falling ticks to 0
sweet thanks
The clone() on the spawn location isn't necessary btw. It returns a copy every time
Is that meant to be a < 0?
No. Wants to tp them if they fall into the void
i just clone stuff out of habit
yeah when they fall in
should probs make player a variable aswell
nasty coding 101
Yeah, you might also want to use event.getTo() instead of player.getLocation() there
Just to be safe 
But make sure that the Location by getTo() isnt null then
I don't think it can ever be
Isn’t it non null
No, it's nullable because it either inherits from PortalCreateEvent or the other way around
and it can be null
It's a weird cyclic dependency thing
Interesting
PlayerTeleportEvent*, sorry
Inconsistent with getFrom, which is a bit awkward
is there any reason why most PlayerEvents use event.getPlayer but PlayerDeathEvent is event.getEntity()
just bugs me lmao
ah wait
extends EntityDeathEvent
Ye
doesnt it
Spigwkward
tbh I feel like defining a getPlayer() there would make sense lol
Even if it just delegates to getEntity()
HumanEntity
Still no idea when a click event can return a human entity, or what a human entity even is
Just any human-like entity
At one point in time, human entities did exist
Players just so happen to also be human entities
EvolutionManager makes HumanEntity
Ye, though at this point it's to stay in line with NMS
There was a Steve and a Black Steve
NMS still abstracts out human entities
Does NMS use them for that packet
"that packet" narrows it down to like... 130 packets my guy lol
Inventory click
afaik yes
a have to make an invitation system that works over multiple servers, really dont want to code rn lmao
https://paste.md-5.net/sayujinivo.cpp
Could someone explain to me why this isn't replacing the text? It's just returning the input
Say I have an event using PalyerTeleportEvent, if i check event.getFrom().getWorld().getPlayers(), would the size be 0 or 1?
assuming the player was only one in world
I would assume it would be 1
as you can cancel the event, which would mean while you are handling the event they would still be there
ah right
i could be wrong though, test it
yeah ill test it rn
kk
is there some way to get the slime the slime split off of in the CreatureSpawnEvent? (when the spawnreason is SLIME_SPLIT)
or a way to get the slime entities a slime split into from the SlimeSplitEvent?
How do i get the GameProfile class? i dont have it in my spigot? my pom.xml https://paste.md-5.net/ufepunoqif.xml
I dont think there is an easy way of doing this because at the time of the SlimeSplitEvent not entities are spawned jet.
@EventHandler
public void onEntityDamageEntity(EntityDeathEvent event) {
if(event.getEntityType() == EntityType.COW);
Cow cow =(Cow) event.getEntity();
cow.setInvulnerable(true);```
So Im trying to make cows invincible
You need the nms sources on your class path
You can just cancel the event
Okk ty 🙂
is there a way to get the slime it split off of in the CreatureSpawnEvent?
Only if the Slime class keeps track of the parent. Lets see.
Doesnt look good
yes i do
welp sad times, thanks for helping either way
Then change the artifact id for spigot-api to spigot and make sure that you ran BuildTools for your version at least once so it can install
spigot into your local maven repository.
Did you run BuildTools on your pc with --rev 1.12.2 as i just told you?
@EventHandler
public void onEntityDamageEntity(EntityDamageEvent event) {
if(event.getEntityType() == EntityType.COW) {
event.setCancelled(true);```
So Here Im trying to do is when a player hurts a cow it sends a message to the player to not kill the cow
so how do it detect that a player is killing the cow
@lost matrix i got this error https://paste.md-5.net/sabihuxena.coffeescript
Works fine for me
522 -> connection timed out
Just try again
I think you can figure that one out. Just run the jar with an older version
So instead of java -jar BuildTools.jar you use the full path to your java binary. So "C:\Program Files\Java\jdk1.8.0_271\bin\java" -jar BuildTools.jar or whatever
This just installs the spigot sources into your local maven repository because its illegal to publicly distribute the code (Mojang eula)
This way maven can resolve the dependency in your projects. Maven only looks in your local repo if the src is not accessible from the web.
oh okay so its just like only on my computer ig
and i just import it with this?
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot</artifactId>
<version>1.12.2-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
yes
make sure the event is cancelled beforehand. use ignoreCancelled = true in the annotation
BungeeCord
@Override
public void onEnable() {
ProxyServer.getInstance().registerChannel("firstbungee:mychannel");
registerCommands();
}
@Override
public void execute(CommandSender sender, String[] args) {
if (!(sender instanceof ProxiedPlayer)) {
sender.sendMessage("Dieser Befehl kann nur von Spielern ausgeführt werden.");
return;
}
ProxiedPlayer player = (ProxiedPlayer) sender;
Setting setting = settings.getOrDefault(player.getName(), new Setting());
ProxyServer.getInstance().broadcast("Nachricht gesendet");
player.getServer().getInfo().sendData("my:channel", setting.getArrayOutput("Settings"));
}
Spigot
public final class Bungeesystem extends JavaPlugin implements PluginMessageListener {
@Override
public void onPluginMessageReceived(String channel, Player player, byte[] message) {
Bukkit.broadcastMessage("PluginMessageRecieved in channel " + channel + player.getName());
if (!channel.equals("my:channel")) {
return;
}
ByteArrayDataInput in = ByteStreams.newDataInput(message);
String subchannel = in.readUTF();
if (subchannel.equals("Settings")) {
PluginMessageHandler.settingsMessage(player, in);
}
}
}
Is there a mistake in it? I don't recieve the message in the Spigot Plugin.
empty
register yoru spigot listener
yes, if forgot it, thanks
yeah
Okay so my retarded ass deleted an entire intellij workspace somehow and since i didnt have it on github i cant retrieve the src
luckily, i had the jar file, so i was able to retrieve the .class files thru recaf. However, .class files cant be edited through intellij.
Since I dont want to have to use recaf to continue on my project is there any way to get all the class files from recaf into .java files in intellij? any help at all will be appreciated.
just download luyten then export it and import it into intellij
what's luyten?
Try fernflower, Procyon, CFR and other decompilers and do a patchwork thing of the different classes so it compiles correctly
decompiler
Luyten isn't really mainstream so I cannot comment on whether it works
for me it does work done
yes
oh ok
thats what decompilers do
however there is a high chance of decompile errors
fuck ive been lied to
Recaf is a bytecode viewer
It has multiple decompilers built in as well as an (dis-)assembler
welp anyway time to download a two year-old .exe from github
Try compiling forgeflower and using it
It is meant to be recompilable, so chances are that it will work for you without too much issues
just watch a youtube or just google
(sorry im a dumbass that has never used a decompiler before)
- open luyten
- import the jar by dragging it in or just do ctrl+o
- do file and do save all
then it will decompile to .zip
kk
Can anyone help me with this?
https://www.spigotmc.org/threads/window-of-conquest.502282/
I have a question. How to disable commands for player.
Cancelling AsyncPlayerChatEvent doesnt work
any help?
CommandPreprocess event or similar
^
thx
How would you guys approach synchronization of data between servers? I can't keep a local cache because the data is always subject to change
I feel my only real option is to just query the database directly
Use Redis if you can
yeah I have redis, but only really use it for pubsub
and I would rather keep all my persistent data on mongo
if you scale that up to query every time you need data, with 500 players that is probably 2000+ requests a second
it's not efficient
oh okay
I'm thinking use redis purely to query and cache
then have my manager download from the cache and save it
but that mean's I'll have to cache all ids and when they are used
Have something like this
Local Cache (In Bungee/every Spigot instance) <-> In Memory Cache (Redis) <-> Persistent Storage (Mongo)
Then use
Redis pub/sub as a messaging service to push essential updates I guess
hmm yeah I was thinking something like that
seems like redis only really supports basic data types
I've found this issue is called an "EAI" issue.
Maybe i can try BSON with redis
serialization 🙂
yeah just use smtng like gson I guess
Hi does anybody have idea why the code doesnt detect file starting with "s" other names work but not those that start with "s".
code: https://paste.md-5.net/rovakuyede.cpp
my directory:
} catch (NullPointerException ex) {ex.printStackTrace();} Pls dont do that.
okay
is menuFile supposed to be a folder?
[AstreansLobbySystem] build.yml
[13:25:52 INFO]: [AstreansLobbySystem] build.yml
[13:25:52 INFO]: [AstreansLobbySystem] buy.yml
[13:25:52 INFO]: [AstreansLobbySystem] buy.yml
[13:25:52 INFO]: [AstreansLobbySystem] buygems.yml
[13:25:52 INFO]: [AstreansLobbySystem] buygems.yml
[13:25:52 INFO]: [AstreansLobbySystem] eshop.yml
[13:25:52 INFO]: [AstreansLobbySystem] eshop.yml
[13:25:52 INFO]: [AstreansLobbySystem] 1
[13:25:52 INFO]: [AstreansLobbySystem] 2
[13:25:52 INFO]: [AstreansLobbySystem] exampleMenu.yml
[13:25:52 INFO]: [AstreansLobbySystem] exampleMenu.yml
[13:25:52 INFO]: [AstreansLobbySystem] gameselector.yml
[13:25:52 INFO]: [AstreansLobbySystem] gameselector.yml
[13:25:52 INFO]: [AstreansLobbySystem] profile.yml
[13:25:52 INFO]: [AstreansLobbySystem] profile.yml
these are the outputs
thats before and other code?
yes
you're probs getting and NPE
This is the correct way of accessing folder paths.
File menuFile = new File(instance.getDataFolder() + File.separator + "menu");
yes i am
wait no you're printing nvm
well your files named S
are last
so before you reach those, you are getting an npe
why not have your catch npe inside your loop
then it wont stop each time you get one
then you can handle it from there
idk
Always test for a null when its possible. Allowing an exception to throw is a heavy load
okay i updated the code at 29 to add npe and it returns only this "[13:31:39 WARN]: java.lang.NullPointerException"
Dont catch any exceptions unless you are forced to. Remove the whole catch (NullPointerException ex) nonsense
perfect
okay how do i fix that
Post the full stack trace
full stack trace is?
There is more after that
the full error
Do you catch the NPE somewhere else?
no
xd
the newMenuFileName is null
ig
bcz when i try debug i get only there the npe
File#list() wont give you a null name
newMenuFileName can;t be null as its initialized
yeah thats weird but when i hided it didnt give me null
It is empty though
before line 9 you shoudl be checking if menufile isDirectory()
okay ill ad it
added
the tempconfig is null
this is the code i have now: https://paste.md-5.net/suzuvenade.cpp
and this is debug https://paste.md-5.net/inekonegug.css
still no s files lol
now yes i changed name
of the files?
yeah
its tempConfig thats null
this code is weird
now it doesnt give me npe in the tempconfig
just a temporary fileconfiguration for checking something
i mean if tempConfig isn't null for the first n iterations
why would it be null at the end
@EventHandler
public void openMenuByCustomCommand(final PlayerCommandPreprocessEvent event) {
final Player player = event.getPlayer();
final File menuFolder = new File(instance.getDataFolder() + File.separator + "menu");
for (final File menuFile : menuFolder.listFiles()) {
String menuFileName = menuFile.getName();
try {
FileConfiguration menuConfig = YamlConfiguration.loadConfiguration(menuFile);
if (event.getMessage().replaceFirst("/", "").equals(instance.color(menuConfig.getString("menu.openCommand")))) {
if (menuConfig.getBoolean("menu.useOpenCommand")) {
instance.getMenuHandler().openMenu(player, menuFileName.replace(".yml", ""));
event.setCancelled(true);
}
}
} catch (final IOException | InvalidConfigurationException ex) {
ex.printStackTrace();
}
}
}
Btw you are def trashing the servers performance with this listener. Each time someone executes a command
you are loading a ton of files from the disk. Reading and writing to a disk blocks a CPU really hard.
instead of concat to get your paths you should usejava tempConfig.load(new File(menuFile, newMenuFileNameList));
okay
File menuFile = new File(instance.getDataFolder(), "menu"); <- I think this will always be a non directory file.
Yeah, sorry I ment for teh second one. as it IS a file not a folder
it can still be a dir, cant it?
i am getting this error: https://paste.md-5.net/kahipahipi.cs
Oh right. You can just remove all the try catch blocks
Hey, everytime I try to build my plugin using Maven it gives me 4 errors, while I didn't do anything wrong..
basically the same
and those errors are?
I'm copying
3 of them :
package net.minecraft.server.v1_11_R1 does not exist
And the fourth one is :
package org.bukkit.craftbukkit.v1_11_R1.entity does not exist
show your pom.xml
You need spigot on your classpath.
Replace the artifact id spigot-api with just spigot
Also make sure to run BuildTools once for 1.11 on your local machine
just use spigot
But then 13 errors..
not spigot-api
try spigot and use buildtools
spigot includes nms and cb
Spigot plugins works on Paper servers right?
yes
Do you mean <dependencies> <dependency> <groupId>org.spigotmc</groupId> <artifactId>spigot-api</artifactId> <version>1.12.2-R0.1-SNAPSHOT</version> <scope>provided</scope> </dependency> </dependencies>?
hav eyou ran build tools
Then you need to run BuildTools
?bt
The home of Spigot a high performance, no lag customized CraftBukkit Minecraft server API, and BungeeCord, the cloud server proxy.
its a jar you have to run, just adds maven dependencies
I just checked and new File can be used to drill deeper https://stackoverflow.com/questions/412380/how-to-combine-paths-in-java
It's a jar I download?
As I can see my java is 1.8.0
nice
Is it the latest version?
then install the git bash and then do it inside of it
nah latest is 16
but dont worry
as i said u need to have 8 or 9 or 10
I installed the BuildTools jar
What is that lol..
google it
git cli
I am not sure I have it
You dont need git. It installs portable git anyways
yeah, pretty sure it can be run standalone
When I go to Start and search for Git Bash doesn't find anything
Just run BuildTools with --rev 1.11.whatever
The home of Spigot a high performance, no lag customized CraftBukkit Minecraft server API, and BungeeCord, the cloud server proxy.
?bt
Using BuildTools is not uploading it to your Build Path right?
no, it adds it to your m2
Should I download Git Bash?
no, It's not necessary
BuildTools is a way to build your plugin right?
no
no
its for spigot dependencies
it builds Spigot
Yeah but how do you use it..
it says on the wiki
I know, but there's multiple 1: 1: 1:
wot
Which is better to code in paper-api or spigot-api?
in 'spigot' bcz api doesnt contain things 'spigot' has
Such as what?
That wasn;t his question
I code in paper-api since the server is on Paper
In spigot you reach a wider audience as its the core. In paper you are limited to 40% of the servers.
Because thats the nature of open source
Oh okay
Yeah but, when I use paper-api there is 4 errors, and spigot-api there is 13 errors
Write better code
Wdym
There shoudl be zero errors
there should still be zero errors
I know, when I try to build using Maven it gives me this errors
But when I build artifacts there's no errors
because to use nms you have to use spigot not spigot-api and you have to run buildtools for the version you want to use.
no, the api has no nms
So why when I artifact build it works?
run buildtools and use spigot instead of spigot-api in your pom
Thanks for the tip, I'll do it
If you are using maven you shoudl not be building with artifacts
I build with artifacts since it automaticly put the plugin into my plugins folder
anyone's good with netty?
you shoudl be building using the lifecycles in the maven tab (right hand side)
Is it better than the artifacts?
Ah
how can i discard through netty sent server packet?
Does every Developer that uses NMS needs the BuildTools?
How to send a message to all the players on the server?
Bukkit.broadcastMessage("Message Here");
thx
i don't, but its better to use it, if you need to only compile the plugin with NMS i'd rather grab paperclip, run it until it patched the jar
and install cached patched jar in local maven repo
i've haven't touched raw spigot in ages
so idk what spigot uses
I am trying to run buildtools, but whenever I type : java -jar BuildTools.jar --rev 1.11
It says :
Loading BuildTools version: git-BuildTools-36c11e9-126 (#126)
Java Version: Java 16
Current Path: C:\Users\ahmad\OneDrive\Desktop\a.
Please do not run BuildTools in a Dropbox, OneDrive, or similar. You can always copy the completed jars there later.
Is it loading?
should run latest spigot
no I mean you should use latest spigot
Please do not run BuildTools in a Dropbox, Onedrive, or similar
you dont have to but you should
Poreyy dont run the buildtool in a onedrive folder
Oh
BuildTools refuses to run in a OneDrive folder, try moving it someplace else
How can I make it so it swaps inventories of players
I am running it in the downloads folder xD
???
is it synced with dropbox or any cloud service
No
like get the online players and swap their inventories randomly
It's building
instead of asking one super specific question, ask a bunch of questions and piece it together
Looks like It didn't work
Found version
{
"name": "1110",
"description": "Jenkins build 1110",
"refs": {
"BuildData": "77931c01e72ff84c004a310b121a72b52f0efdd5",
"Bukkit": "55fa63e8b9c8f5f315f3d631fad2096a008074df",
"CraftBukkit": "c8ff65136f23a3c2770b8d9ca508f61927f8acba",
"Spigot": "6f7aabf0f73188de2433ec4570412235772f8fba"
},
"toolsVersion": 47
}
*** The version you have requested to build requires Java versions between [Java 7, Java 8], but you are using Java 16
*** Please rerun BuildTools using an appropriate Java version. For obvious reasons outdated MC versions do not support Java versions that did not exist at their release.``` That means it didn't work right?
You have java 16 but u need java 7-8
JDK 16 or JDR?
da hell is jdr lol
Use the JRE
yes
Alright should I remove my java and install a 8 one?
Don't use jdk
you can switch your java version in your environment variables normally.
no u can use commands to switch
ig
How?
I mean give me the command
<JRE path> <Ur command>
@rapid vigil
example:
"C:\Program Files\Java\jre1.8.0\bin\java.exe" -jar example.jar
1.8.0
yeah this is the latest jre ig
yes
and here also https://www.java.com/en/
Isn't this the latest one?
I need the 8
Okay
it's the latest jre not jdk
yeah normal
did u install java 8?
Yes
open file explorer and go to this directory
"C:\Program Files\Java"
When I try to run the buildtools :
Do this @rapid vigil
and then open the jre folder
$ java -jar BuildTools.jar --rev 1.11
Loading BuildTools version: git-BuildTools-36c11e9-126 (#126)
Java Version: Java 16
Current Path: C:\Users***\Downloads.
git version 2.31.1.windows.1
BuildTools
unconfigured@null.spigotmc.org
Attempting to build version: '1.11' use --rev <version> to override
Found version
{
"name": "1110",
"description": "Jenkins build 1110",
"refs": {
"BuildData": "77931c01e72ff84c004a310b121a72b52f0efdd5",
"Bukkit": "55fa63e8b9c8f5f315f3d631fad2096a008074df",
"CraftBukkit": "c8ff65136f23a3c2770b8d9ca508f61927f8acba",
"Spigot": "6f7aabf0f73188de2433ec4570412235772f8fba"
},
"toolsVersion": 47
}
*** The version you have requested to build requires Java versions between [Java 7, Java 8], but you are using Java 16
*** Please rerun BuildTools using an appropriate Java version. For obvious reasons outdated MC versions do not support Java versions that did not exist at their release.
how to get the spaces between the arguments when a command is entered?
Then?
open the bin folder
Poreyy you could install jre 8 as hesham says and then change the system environment variables to target 8
Opened bin
scroll until u find java.exe and just click it once don't open
did u click the java.exe once?
Are you installing Java 8 right now?
Yes
Hope so
press the copy path on top of the window
I hope not
https://adoptopenjdk.net/ get Java 16 instead
we need 8
It's installer is 200x better than Oracle Java, so even for Java 8 it's nicer
can you not just use --release 8
i don't think it works
I guess n ot. I just tried it
Done
now go run ur command that runs BuildTools
but replace java at the start of the command with the path that u copied
@rapid vigil
I am not sure if it worked
give me ur path
It created 8 folders
yeah it's running
But I can't use NMS anymore..
It's running, I can not use spigot?
Instead of spigot-api
if this is ur command
java -jar BuildTools.jar --rev 1.11
u must do like this
"<path u copied>" -jar BuildTools.jar --rev 1.11
No u can't
spigot is the server client
ss?
spigot api is the coding api
there is no such thing as a server client
and the plugins api
I am using java -jar BuildTools.jar --rev 1.11
I'm just saying so he can get the idea
How can i make this:
If the player types "/reset" the overworld,nether and the end is getting deleted and a new overworld, nether and end is getting new created
Spigot (the artifact) is spigot-api + NMS
"name": "1110",
"description": "Jenkins build 1110",
"refs": {
"BuildData": "77931c01e72ff84c004a310b121a72b52f0efdd5",
"Bukkit": "55fa63e8b9c8f5f315f3d631fad2096a008074df",
"CraftBukkit": "c8ff65136f23a3c2770b8d9ca508f61927f8acba",
"Spigot": "6f7aabf0f73188de2433ec4570412235772f8fba"
},
"toolsVersion": 47
}
*** The version you have requested to build requires Java versions between [Java 7, Java 8], but you are using Java 16
*** Please rerun BuildTools using an appropriate Java version. For obvious reasons outdated MC versions do not support Java versions that did not exist at their release.
Basically this..
Ugh, ancient mc releases, wtf are you doing
I will honor a move where Mojang updates Minecraft to Java 15 and basically kills the entire ecosystem that lives until 1.12
I gave u the command
.
How can i make this:
If the player enters "/reset", the world is completely reset. A whole new overworld, nether and a new end is created
rm -f / --no-preserve-root
that would be problematic if they have no where to be
i mean in IntelliJ
Just use processbuilders to invoke that command
If the player enters "/reset"
like what would happen if the entire fucking world got thanos snapped while they're still in it?
How can people use Eclipse while there's no pom though
Nothing
Nononoo the Server is getting stopped
automatically
Just delete the world on shutdown
So how the plugin is going to work?
Or perhaps disable auto-save?
if server is off plugin is not on
so:
User executes the command /reset
All users are kicked from the server to prevent issues
Blacklists any further connections until server restart
Remove all world data
Restart the server```
Its clarified
about auto save
how can I make the server auto saves it self?
Does it per default
Paper saves the world every tick, not entirely sure how it works on Spigot
Does any1 know how i can give vanilla mobs a custom name when they spawning? i tried it with CreatureSpawnEvent and then set the Custom name but it didnt worked
You mean the nametag name, right?
yes
use this to set teh name before it spawns https://hub.spigotmc.org/javadocs/spigot/org/bukkit/World.html#spawn(org.bukkit.Location,java.lang.Class,org.bukkit.util.Consumer)
did u make setCustomNameVisable(true);
idk this may help
yes
i mean you could register you own custom mob via NMS datawatchers but idk
that way they could spawn in wilderness
"Could not find artifact io.papermc:paperlib:pom:1.0.4 in spigotmc-repo (https://hub.spigotmc.org/nexus/content/repositories/snapshots/)"
public class MobHealth implements Listener {
public void onSpawn(CreatureSpawnEvent e) {
if(e.getEntityType() == EntityType.WITHER) {
e.getEntity().setCustomName("§c" + e.getEntity().getHealth() + "❤");
e.getEntity().setCustomNameVisible(true);
} else {
e.getEntity().setMaxHealth(100);
e.getEntity().setHealth(100);
e.getEntity().setCustomName("§8[§7Lv?§8] §c" + e.getEntity() + " §a" + e.getEntity().getHealth() + "§7/§a" + e.getEntity().getMaxHealth() + "§c❤");
e.getEntity().setCustomNameVisible(true);
}
}
}
my code
i tried
paper. This is Spigot
Ask Paper, this is spigot
So I cannot use EssentialsX in spigot?
Then ask EssX, this is spigot
alright, sorry
Though it is strange that is happens
But not the fault of spigot since paperlib was never provided at spigot
Not strange they just forgot to add the repo to the POM
Well, it still takes quite a lot of effort to not spot this error
you can only access the bot if your account is registered
i'm trying to set a texture pack to a player with the player#setResourcepack() method BUT the client fails to download the pack
the link i'm using is for sure direct
and i'm listening to the PlayerResourcePackStatusEvent to determine whether the pack is downloaded or not
i have tried with more than 5 different hosts but none of them seems to be working
make sure it's the direct download link
as in, you go to that link and the file downloads
none of this redirect stuff
it is i checked it
give it a try ur self
i also read that minecraft is using http protocol instead of https so do i need a provider without encryption?
google drive uses https and so does dropbox
but i don't really know if that's the case
problem
so
im using paper
and i wanna get BuildTools
but how
i use paper but every tutorial is using spigot
This is spogot support, not paper
okay..
im using an IntelliJ Plugin named "Minecraft Development" i selected "Paper" how can i change it to "Spigot"
?
Paperspigot is very similiar to Spigot in terms of API
its backwards compatible to spigot
don't worry
PaperSpigot is Spigot but on steroids
lmao