#help-development
1 messages ยท Page 203 of 1
imaginary
imaginary gf ๐ฅบ
like this correct?
is it xd?
what kind of x is that supposed to return huh
the x , in the chunk xd?
im confused, is that location variable nms or smth?
i mean chunks cover a 16 * 16 * whatever heigth area so what x does it return lol
๐
i see
But again, getChunk() will load that chunk, so if you can avoid doing that you probably should
ah the worldX >> 4 coordinate?
If you want a chunk coordinate, get the world coordinate and shift it right by 4
Yes
ah that was pretty confusing
the problem is when i leave the server , the armorstand [lootbox] stop rotating & stop working like it should
thats what iam trying to fix right now ..
Well, getX() is part of Chunk so it should return the chunk's x coordinate ๐
i dont want to remove it when i leave , because it will remove it for everyone else
hmm
Hello! Is there a way to change the text here?
theres some event for that iirc
nice diamond u got there
its an armorstand .. xd
stash weird, why having a player view and a dedicated player list
what
oh they have a playerlist and a view of it ig
https://prnt.sc/8jf86igQ3uXY the whole thing now looks like this instead of this: https://prnt.sc/ALcQ9fnt9H5v with this code here: https://prnt.sc/fx_K3A_7FoQ2
The icon is not displayed, do you know why? :p
Hi im having problem with a code
Code: https://sourceb.in/tEXFbAYbkA
Error: https://sourceb.in/ifXw99M43k
(Im making a multi version plugin )
You need to change your pom so you are not filtering the structure file
How do you know what my pom is
From what i can tell i could be wrong but it looks like the item in the players held item slot is null,
<resources>
<!-- Include all resources -->
<resource>
<directory>resources</directory>
<filtering>true</filtering>
<includes>
<include>*.yml</include>
</includes>
</resource>
<resource>
<directory>resources</directory>
<filtering>false</filtering>
<includes>
<include>*.nbt</include>
</includes>
</resource>
</resources>```Something like
probably i should check if the item is not there?
yeah try that also u seem familiar to me
modify the resources section as I showed and it will fix your GZIP error
I think ive seen u around here zerotwo, i am pretty sure u helped me
i could be wrong though
strange no server in common
other than spigot
u in the minehut discord?
k
if so then thats where ive probably seen u in
@eternal oxide this is what I have rn
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<source>${java.version}</source>
<target>${java.version}</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.2.4</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<createDependencyReducedPom>false</createDependencyReducedPom>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
</build>```
no
hm then i wonder where ive seen u..
anyway, if u need help im always happy to help
looks fine, all you need do is modify the resources section as I showed. One resource which has filtering true that only does .yml files and one with it false for everything else
?paste
change the <directory> to match whatever you use <directory>src/main/resources</directory>
in both
then you shoudl be good to go
kk
There is no setRenameText for anvil guis?
what r u tryna do?
Set the rename text in an anvil gui.
Am I gonna have to use NMS?
that i can tell there isnt a rename text in the anvil gui,
u would have to manually set it
add a debug so you know when it's supposed to paste in a new chunk
if you get teh message but no paste then your structure is empty
in Isnewchunk?
add lots of debug so you know how far your code gets
like, start of event, inside runnable, before and after paste
k
hey, is 1.19.2 recommended to use?
kk ty
np
Using NMS I assume.
so no new chunks?
public void BackroomsGenLoad (ChunkLoadEvent e){
System.out.println("Hi, code works1");
if(e.isNewChunk()){
System.out.println("Hi, code works2");
Bukkit.getScheduler().runTask(plugin, () -> {
Location loc = new Location(e.getWorld(), e.getChunk().getX() * 16, 40, e.getChunk().getZ() * 16);
backroom.place(loc, false, StructureRotation.NONE, Mirror.NONE, 0, 1, new Random());
System.out.println("Hi, code works3");
});
}
}```
oh wat
wait
wait
@eternal oxide
its now spamming all 3
debugs
then it crased
crashed
is anythign being paste in the new chunks?
nop
it sounds like you may have had an already generated spawn area
so you only saw new chunks as you moved
Yea i did
nothign will paste in already generated chunks
Ik, but even in new chunks nothing pasted anyway
your debug says the code all ran fine, so it has to be your structure that is empty
so what should I do
@eternal oxide
The code seems fine as your debugs ran, the only thing it can be is an empty structure
So how might I remake the nbt?
remake it and be certain its from the correct location
thats just the generateStructure method
I already have that in the main calss
using WE paste the schematic in teh correct location and call generateStructure
ye
but
like
whats the function I should call in the onenable
Hey, does anybody know if I can set a placeholder for something that isn't a Player?
you don;t call it in onEnable
I have Clan objects and I want to set placeholders for the clans, not for the players
public Structure generateStructure(String name) {
World world = Bukkit.getWorld("Backrooms");
NamespacedKey key = new NamespacedKey(this, name);
Location loc = new Location(world, 0, 7, 0);
Structure newStructure = Bukkit.getStructureManager().createStructure();
newStructure.fill(loc, new BlockVector(16,7,16), false);
Bukkit.getStructureManager().registerStructure(key, newStructure);
Bukkit.getStructureManager().saveStructure(key);
return newStructure;
}```
@eternal oxide how should I call on the generateStructure
I'm busy cooking dinner at the moment
You call that to save a Structure from teh world
yours is wrong
you are saving from the world "Backrooms".
unless you already have a schematic paste into your Backrooms world at 0,7,0 you will be saving an empty structure
yea i wont do it yet
but would this suffice?
generateStructure("backrooms");
Is there a way to increase structure placing performance without worldedit?
faster computer
That doesn't help 
yes
And how would i do that? Could i get the blocks from a structure and place them one by one using workloads?
how do i spawn a dust particle with custom color?
Particle.DustOptions?
oh ok didnt know it was a thing
@eternal oxide
how can I make a Recursive GUI?
Why isn't blockData.getMaterial() != location.getBlock().getBlockData().getMaterial() getting triggered
a what
if getMaterial() returns Material Enum you can try block.getType() equals to otherBlock.getType()
for example the File Explorer in Windows
Will give it a go
U mean pages? pagination?
give it pages
doing System.out.println(blockData.getMaterial() + " : "+ location.getBlock().getType()); gets me GRASS_BLOCK : AIR
which is strange
in what context
comparing my block to the block thats in the location i figured it out
not actually that I mean for example I wanna be able to browse my plugin directory in a GUI and edit it contents via GUI
but I'll need some way to make a GUI which is gonna get all folders in one folder and when you click some folder it will open another folder/GUI which will be set with the files and folders
it's hard to explain I can try to give an example with a Video if there's some way
Google about lazy node loading, and somehow impl it with inventory
Like you can list files/dirs of dir quite easily
Java api provides that
can someone help me
I can get already all the files, folders and sub folders the problem is how to generate the GUIs
if you want to be able to join in newer version you'll need to add the plugin ViaVersion
oh ok
also I don't think this is the right place to ask these questions
Anyone know what the event is when someone punches/explodes an end crystal?
PlayerInteractEvent maybe?
I thought maybe
ima test it
or would it be PlayerInteractAtEntityEvent
yeah too
PlayerInteractEvent works, but how would I get the damage dealt? (EntityDamageByEntityEvent doesn't work). I want to cancel the crystal exploding but know how much damage is dealt to the crystal
and yes you can crit end crystals
moved it to a thread:
https://www.spigotmc.org/threads/crystal-damage-event.577587/
so you wanna get the Crystal Damage
you can try EntityDamageEvent
What's the equivelant of Hashmap but for multiple values under same key?
So UUID is key and i can keep a List<> and a String under it
Multimap
public void execute(CommandSender sender, String[] args) {
ProxiedPlayer player = ProxyServer.getInstance().getPlayer(args[0]);
ProxiedPlayer p =(ProxiedPlayer) sender;
if(args.length >=3) {
sender.sendMessage(new TextComponent(ChatColor.RED + "Use /group <create> <rank>"));
sender.sendMessage(new TextComponent(ChatColor.RED + "Use /group <delete> <rank>"));
}else {
if(args[0].equalsIgnoreCase("create")) {
String rank = Joiner.on(" ").join(args);
if(args[1].equalsIgnoreCase(rank)) {
//CREATE NEW GROUP IN CONFIG.YML BUNGEECORD
}
}
if(args[0].equalsIgnoreCase("delete")) {
}
}
}```
How can i create new group?
what the fuck is that cod
e
why are you making a bungeecord plugin
while not knowing
sql mongo or any other database
kek
if you cant find information about configs then you are not a developer
anyone know how to cancel wolves from eating the food in your hand
probably the PlayerInteractEvent
Sorry, I'm still learning
^
man
Can anybody help me through obfuscating forge mods?
If youre gonna throw a tantrum then dont, I know what youre gonna say
if youre not gonna give advice, then please dont talk
kind of rude to say these things given you already know where you are at
Well still rude nonetheless. Have you gone over to forge discord to ask?
from what I know from doing forge things a while long back was that you didn't deobfuscate anything
you just worked with the obfuscated code
double x = Math.cos(radians) * radius;
double y = 1
double z = Math.sin(radians) * radius;
is this right for making a circle?
no moving an npc
what do you mean by this? Deobfuscating or Obfuscating? Because Obfuscation is automatically made on Forge Mods
but the obfuscation is only on Minecraft stuff
Obfuscation! He is talking about that
How can I use a custom texture pack on the server where you can also put images in the scoreboard like in Landania net?
static ๐คข
?
I pinged you?
how do I make command argument options
TabCompleter
how do I use that
?jd-s
declaration: package: org.bukkit.command, interface: TabCompleter
Yes, how do i do that?
any ideas?
BE patient
ok, because mine auto completer, just recommend the arguments
StringUtil::copyPartialMatches
But if type an argument first 2 words, its replace it by the first argument from the list
In ref to?
oh ok
I thought you were going to help me
Loving lmabda!!
it isnt lambda tho
I mean i love one liners
yikes
pls?
I dont like impatient ppl
anyone know how to cancel wolves from eating the food in your hand
cancelling PlayerInteractAtEntityEvent, PlayerInteractEntityEvent, an PlayerInteractEvent doesnt work
?notwork
like right clicking rotten flesh on a wolf
save an uuid as a string
LMAo i have to much thing to swear about shity spigot api
๐ก ๐ก ๐ก ๐ก ๐ก ๐ก ๐ก ๐ก ๐ก ๐ก
wdym by checks
Trollign == BAN
?
Someone can help me with citizens
?ask
If you have a question, please just ask it. Don't look for staff or topic experts. Don't ask to ask or ask if people are awake or available. Just ask the question to the channel straight out, and wait patiently for a reply. Make sure you use the right channel regarding the topic of your question. Create a thread in case the channel is already in use!
i dont have any checks though
If you have a question, please just ask it. Don't look for staff or topic experts. Don't ask to ask or ask if people are awake or available. Just ask the question to the channel straight out, and wait patiently for a reply. Make sure you use the right channel regarding the topic of your question. Create a thread in case the channel is already in use!
override serialize method
i just cancel the event and it doesnt work
"Does not working" is a useless statement. Please describe what exactly is not working, what you expect it to do, and what actually happens. If you get any console errors, also ?paste the entire stacktrace.
What?
the wolf still consumes the food item
?notwork
?doesntwork
?notworking
"Does not working" is a useless statement. Please describe what exactly is not working, what you expect it to do, and what actually happens. If you get any console errors, also ?paste the entire stacktrace.
shity bot
what a shity life i have
Why dont use fucked "/" commands
๐ก
Too much spigot today
cuz slashcommands are shitty
I also dont have any other alternative because paper comm is more shity hahaha. Atleast here ppl help fast and its not a death comm
Mainly because they doesnt allow to press enter
I mean they are not well designed
What?
Ah yes
Its really ugly
I get this error when building my project with maven: Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project PlertanixShop: Fatal error compiling. How can I fix that? What do you need to now whats the problem?
pls lol its been a time already
you cannot
well this method wont work
Well, if you are coding the NPC yourself, move it each tick following a path you computed
if you are using citizens, they have API for that
I have mine
what path class should I use
streams are lit!!!
Hehe now i have discover an issue
streams are one of those things i avoid because they look way too good to be true and i have a mindset that they will be inefficient
premature optimisation 
Glorified for loops and just as efficient. Use a hashmap instead of the catastrophe of Verano
looks like you are griefing yourself
[21:09:23 ERROR]: [org.bukkit.configuration.serialization.ConfigurationSerialization] Could not call constructor 'public dev.alex.net.api.region.Region(java.util.Map)' of class dev.alex.net.api.region.Region for deserialization
java.lang.NullPointerException: Cannot invoke "java.util.Collection.toArray()" because "c" is null
๐คก
Also there is none field called "c"
#rekt
anyway to check when an entity (specificly a player) hits a block?
even if they dont take fall damage
Just be careful with the event considering it gets executed a lot
alr
[17:28:20 INFO]: [BetterServer] Enabling BetterServer v1.0-SNAPSHOT
[17:28:20 INFO]: [BetterServer] is running
[17:28:20 INFO]: [BetterServer] made by Ethan Garey
[17:28:20 INFO]: [BetterServer] version: 1.0.0.0
[17:28:20 INFO]: [PlugWoman] Enabling PlugWoman vfec830f
[17:28:21 INFO]: Running delayed init tasks
[17:28:21 INFO]: Done (5.568s)! For help, type "help"
[17:28:21 INFO]: Timings Reset
[17:28:21 INFO]: [BetterServer] There is a new update available <Removed link cause i dont want to be banned>
.
https://paste.md-5.net/oriqahirul.java
There is not supposed to be a update avalible, anybody know why this is happening?
wait a while before testing it again or disable caching
thats probably because of the cache
so it is working?
cause it's been 10 minutes since i updated it
wait
it woks ๐
works*
I got scared ;P
idk how it works in streams but you can use URL#openConnection and disable caches
HttpsURLConnection con = (HttpsURLConnection) new URL(URL_HERE).openConnection();
con.setUseCaches(false);
InputStreamReader reader = new InputStreamReader(con.getInputStream());
String text = (new BufferedReader(reader)).readLine();
this one worked for me
How can I run
if (this.getDescription().getVersion().equals(version)) {
getLogger().info("There is not a new update available.");
} else {
getLogger().info("There is a new update available. ");
}
});```
In a different file than main, Because I cant extend javaplugin in any other file
?di
Guide to dependency injection: https://www.spigotmc.org/wiki/using-dependency-injection/
public class MyClassName {
private final MainClassName plugin;
public MyClassName(MainClassName plugin) {
this.plugin = plugin
}
}
Only one class must extends JavaPlugin
wait i'm still having trouble
with this specific
where should I put this
how can I make that just like "Update()"
so I can use it in other classes
?di is not helping me
Guide to dependency injection: https://www.spigotmc.org/wiki/using-dependency-injection/
public class MyClassName {
private final MainClassName plugin;
public MyClassName(MainClassName plugin) {
this.plugin = plugin
}
public void checkForUpdates() {
new UpdateChecker(plugin, 105989).getVersion(version -> {
if (plugin.getDescription().getVersion().equals(version)) {
plugin.getLogger().info("There is not a new update available.");
} else {
plugin.getLogger().info("There is a new update available. https://www.spigotmc.org/resources/betterserver.105989/updates");
}
}
?pingpoof
where would I put that?
"there is not a new update available". That sounds so off lol
Its sounds like you havent read at all how DI works
in the class where you want the update checker
what
Second time i ask, Have you read about DI?
nope
as long as you have di just add
new UpdateChecker(plugin, 105989).getVersion(version -> {
if (plugin.getDescription().getVersion().equals(version)) {
plugin.getLogger().info("There is not a new update available.");
} else {
plugin.getLogger().info("There is a new update available. https://www.spigotmc.org/resources/betterserver.105989/updates");
}
``` in there
He didnt read DI!!
What would be an efficient way to make it so when a player renames an item, it doesnโt change the result item but they can use the rename bar for text input?
theres an example like 10 messages above
Ik, but he havent read it
I wont give him code until he try do it himself
Because there is how you start failing when you need to code yourself
on the command register it should look like getServer().getPluginCommand("command").setExecutor(new ClassName(this))
the this is for di
He is definitly trolling
I would recommend more reading about Java. What more i can say!
'UpdateChecker(org.bukkit.plugin.java.JavaPlugin, int)' in 'BetterServer.Commands.AdminEssentials.UpdateChecker' cannot be applied to '(BetterServer.Commands.AdminEssentials.BetterServerHelper, int)'
?paste the class
Bro dont lie, have you start coding without the knoledge of java?
Because this type of things wouldnt be happening if you have learnt java before
I mean i dont to sound rude im just really stressed of that type of people
I figured it out.
I still have the screenshot lol
?
shush
๐
Cancel the rename and use what was supposed to be renamed as the name?
Hahaha
i knew no java before i just dumped myself in the deep end and made it work
Hey please i need help with fucking Yaml serialization
Im fucked about of the shity problems its has
I have been full afteernon swearing with this shit
๐ก
What a shity library LMAO
Or a bad coder ๐
?
Like I donโt want it to replace the result, not that they cannot pick it up.
??
anybody want to rate my plugin?
Your better server?
Me!!!!!
help
I want to see that src
I mean it's like a lower end essentials
?ask
If you have a question, please just ask it. Don't look for staff or topic experts. Don't ask to ask or ask if people are awake or available. Just ask the question to the channel straight out, and wait patiently for a reply. Make sure you use the right channel regarding the topic of your question. Create a thread in case the channel is already in use!
okie ill dm you the link
?paste your errors please
Mainly reeinventing the well as usal
It's got nothing that someone wouldn't skip over for essentials or another like plugin
Don't pass name null?
I need to make a tutorial on how to read an error it feels like.
public void onJoin(PlayerJoinEvent e) {
Player p = e.getPlayer();
if (this.config.getConfig().getBoolean("TeleportOnJoin.Enable")) {
if (!Bukkit.getWorlds().contains(Bukkit.getWorld(this.config.getConfig().getString("TeleportOnJoin.World")))) {
Bukkit.broadcastMessage("Spawn locations has error world.");
return;
}
Location loc = new Location(Bukkit.getWorld(this.config.getConfig().getString("TeleportOnJoin.World")),
this.config.getConfig().getDouble("TeleportOnJoin.X"), this.config.getConfig().getDouble("TeleportOnJoin.Y"),
this.config.getConfig().getDouble("TeleportOnJoin.Z"), this.config.getConfig().getInt("TeleportOnJoin.Yaw"),
this.config.getConfig().getInt("TeleportOnJoin.Pitch"));
p.teleport(loc);
} else {
Bukkit.broadcastMessage(("Spawn is not configured"));
}
}```
help
Your config value is null?
no
?paste the whole class
?jd-s
?
unless this is your main class im gonna say your config is null
To me it looks like the value is null
Since it's not a config is null error rather the world name is passed as null
that happens to me when the spawn is not configured how can I say that the spawn is not configured
Null checks.
Null checks
md5 had a video to map plugin made
is it still out there somewhere or is it discountinued and doesnt work in later versions
to map plugin made?
What would the best way to determine if a player walks into a certain area?
check player pos
theres also region plugins like worldguard
if you are trying to disable block breaking etc
Is there an event I can use to determine if they walk into let's say an end gateway?
I don't want to lag the server, so I don't see any other way to do it :P
stop pinging me please
if you are trying to log a player being teleported by end gateway there is a method
listen to teleportationevent and get cause
walking into end portal is a different matter
If u can do it on Skript for sure you can do it on Java
You can just check the event when you join the portal and open an inventory
๐ค
Hmmm, one second
Either that or what i have said
i mean we said the same thing
join the portal =tp?
Could you link the docs to event I need to use?
wait is that end portal or nether portal
tell me if it is end or nether portal first
bc nether portal doesnt instantly trigger tp
End portal
Im not trolling
Its end portal Bruh
you can just google "player teleport event spigot"
Indeed
there wont be people helping you each time
A fast research on ?google
i was confirming
<!-- Replace this with your package! -->
<shadedPattern></shadedPattern>
(Maven)
I dont know what to replace it with (I dont really know how to use maven)
Google your question before asking it:
https://www.google.com/
What are u tring to do?
add bstats
Have you read about maven first?
?learnmaven ?
declaration: package: org.bukkit.event.player, class: PlayerTeleportEvent
?maven
The home of Spigot a high performance, no lag customized CraftBukkit Minecraft server API, and BungeeCord, the cloud server proxy.
Im not with humor to help without atleast having the basic knownledge about maven
Will try it!
ok good luck
just tell me what I should set the package name to
<!-- Replace this with your package! -->
<shadedPattern></shadedPattern>```
Read please!
Google is your best friend tho
Google your question before asking it:
https://www.google.com/
is it me.BetterServer?
"org.shaded.plexus.util" That doesnt help!
just tell me what it is!
?
I mean i would be being more helpful but atm im currently working that why
it would be something like me.myname.plugin.libs.bstats
Follow-up on this, what would the cause be?
shaded pattern is whatever you want it to be, but generally you would match it with your other package naming schemes
and then add something unique to its name
What's the process for making custom advancements?
@remote swallow https://bstats.org/getting-started/include-metrics
A description on how to include bStats to your plugin
this is what i'm stuck on
Dont tag please
its fine, i dont mind it
mb :C
whats your project structure
you do realize you don't have to shade it right?
you could just instead copy the class
if i'm going to learn maven might as well do it now
but as epic said, we need to know your project structure to help
a screen shot of the package naming is good enough
oh, just BetterServer
;-;
ill see if it works
BetterServer.Metrics
https://bstats.org/plugin/bukkit/BetterServerOfficial/16752
It still hasnt updated
where do I need to put the id?
maybe
Super confused on what I did wrong here... java this.getServer().getPluginManager().registerEvents(new fwoostybots.com.xosurvivalcore.Events.PlayerEvents(this)); PlayerEvents class: https://pastebin.com/MXSK9j1e
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
new ClassName(this), this
Ah, thank you!
e
What's the process for making custom advancements?
[19:33:02 INFO]: [BetterServer] Disabling BetterServer v1.0-SNAPSHOT
[19:33:02 INFO]: The following plugins could not be reloaded:
[19:33:02 INFO]: BetterServer: Error on enable: NoClassDefFoundError -> ClassNotFoundException
Is there a solution to disable mongo logging?
get the logger and disable?
https://www.mongodb.com/community/forums/t/how-do-you-stop-java-driver-logging/3213/6
To suppress MongoDB Java Driver logging, I tried this and works fine: Logger logger = Logger.getLogger("org.mongodb.driver"); logger.setLevel(Level.SEVERE); I used Level.SEVERE instead of OFF, so that the severe errors can be logged and noted, ignoring all the other informational and warning messages. Depending upon your need you can also use ...
Mongo moment 
Still nothing?
Did you add it to your dependencies in your yml and your plugins folder?
Your plugin.yml?
you try to use Metrics and this is a dependency the error is for this dependencie not found. (in POM/BUILD and YML)
its in pom
Well do you shade it into your plugin?
where do I put it in yml
Or is it provided
The home of Spigot a high performance, no lag customized CraftBukkit Minecraft server API, and BungeeCord, the cloud server proxy.
but metric not sure if is a plugin then.. check the pom
and check the final JAR if has the classes
funny thing this doesn't work for me
Why do you relocate? Do you need to?
I have tried it
But i couldnt disable it
i think so
Do you know why?
ugh I hate it.
That error would imply it's not shaded properly. mvn clean package maybe
Is it in the jar?
I can send you the jar if you want
You can check yourself
whats it supposed to do
if you don't know find out
the other is use the logback or dont remember what and override the logger in the logback.xml file...
Anyone know why IntelliJ will not recognize any bukkit or spigot imports??
https://imgur.com/pWVayUn
Have you try invalidating cache?
on it boss. will try that
Also can try option reload files from disk
refresh project
when shading in a library you should always locate for plugins otherwise it will conflict with libs present on the server.
classes are registered on the path with their full qualifying name, which means package name. So if you didn't relocated and there was a bstats jar on the server they would conflict with each other because package + name of class would both be the same and the JVM not knowing which one it should use
look inside of betterserver directory
you should have a metrics folder in there
if you followed how I told you how the shaded pattern should be
cause its a jar file
are you even looking inside of the right jar?
by renaming a .jar file to a .zip this is what I got
you should have another jar called shaded
Yes!
look in there
not sure why your shaded jar contains other jars
I don't need to see that
what do I need to do just tell me
in your projects build directory
fixed it, thank you
look to see if you have a jar that has in its name shaded

oh alr
you show me one more thing I didn't ask for and I am out
in your build directory where you found your jar file
there should be another jar that has the word shaded in its name
just so I dont make you mad build directory means what? (I dont wan tto get this wrong)
build directory, is the directory where when you compile the jar shows up
I compile it right to my plugins folder
probably shouldn't do that and may be some of the reasons you are having issues >>
most likely
I deleted all the folders and my betterserver.jar and re compiled it and restarted my server, it still doesnt work though.
change the directory for compiling, and then re-compile the plugin. Then let us know the results you get from that
ok
don't set the build directory to your plugin folder, use some other folder that isn't part of your servers stuff
Is there a way I can make my code wait let's say 1 second before performing a function?
yes
How would I do that?
?scheduling
if (world.equals("spawn")) {
if (cause.equals(PlayerTeleportEvent.TeleportCause.NETHER_PORTAL)) {
e.setCancelled(true);
Location loc = new Location(Bukkit.getWorld("spawn"), 0.5, 100, 55.5, 0, 0);
player.teleport(loc);
// wait 1 second
player.performCommand("wild");
}
}```
I just need the wait right there
the first image happend second&
declaration: package: org.bukkit.scheduler, interface: BukkitScheduler
This goes in my Main, right?
where ever you need it
based on the code above you should use the sync method
if you were using things that were able to be done async, there is a async method of that one as well
what does your pom look like?
?scheduling read this
use scheduler, better imo
I can set it up to run it continuously, but how do I make it delayed in my event? I don't understand that at all.
runTaskLater
ok fixed your pom a little bit, so I am assuming you are using intelliJ
and I think I know what you may be doing wrong
Yea
if (world.equals("spawn")) {
if (cause.equals(PlayerTeleportEvent.TeleportCause.NETHER_PORTAL)) {
e.setCancelled(true);
Location loc = new Location(Bukkit.getWorld("spawn"), 0.5, 100, 55.5, 0, 0);
player.teleport(loc);
// wait 1 second
new BukkitRunnable() {
@Override
public void run() {
player.performCommand("wild");
}
}.runTaskLater(plugin, 20L * 30L /*<-- the delay */);
}
}```
Like this? or what ;-;
hit the big green play button thing to build your project
Unsupported class file major version 60
interesting
Want me to share my screen?
guess intelliJ uses that one line lmao
ill reload maven
well that should be updated but that isn't the issue
sure reload it first and see if problem goes away
otherwise I already know how to fix it lol
it happened to someone else and it was because an outdated shade plugin
might be the same issue
BetterServer-1.0-SNAPSHOT.jar, bstats-base-3.0.0.jar, bstats-bukkit-3.0.0.jar define 1 overlapping resource:
- META-INF/MANIFEST.MF
maven-shade-plugin has detected that some class files are
present in two or more JARs. When this happens, only one
single version of the class is copied to the uber jar.
Usually this is not harmful and you can skip these warnings,
otherwise try to manually exclude artifacts based on
mvn dependency:tree -Ddetail=true and the above output.
See https://maven.apache.org/plugins/maven-shade-plugin/
just skip the warning
you used the big green play looking button right?
yes
alright what does it look like inside the jar?
also, not sure why you defined two bstats dependencies
or maybe you didn't, anyways onwards too looking inside your jar
so should I zip the jar file and take a screenshot?
however you normally do it
interesting that it is shading the jars into your jar
how the
it shouldn't be doing that since you didn't specify it
it was in avalible elements
ok...how do you put it back over in available elements?
we don't want the jar files themselves inside of your jar
alright now back inside your jar
click on BetterServer
there should be a directory called bstats
and there isn't
does the bstats folder exist in the first place
fabulous, try building it again now that you removed those things back to available elements
it only exists at compile time
isnt the folder meant to exist before hand so that it can actually relocate to it
can I just share my screen ๐ญ
see, even I shade in bstats
the very same way
but I don't use IntelliJ
and I am assuming it is IntelliJ screwing this up somehow
I use Netbeans in case anyone is curious ๐
Intellij doesn't have this problem if you don't mess with it
frost dms
Well with great power comes the need for great debugging skills
well I will have to let others handle that as I don't use IntelliJ at all
There is nothing wrong with the Pom that I can see, so it isn't maven on this one
lol
Does anyone know how I can remove the jeb_ when looking at the sheep?
I think there's a CustomNameVisible tag or something
Any saver that can send a shity item serialization for mongo?
I give up on adding bstats
It also gives you all the code to do it with Maven and Gradle
It really is copy/paste for the most part
they messed with intellij settings in regards to maven
have no idea what they changed, but it has messed up maven doing its thing properly
their pom is fine, but whatever it is they are doing or have done its not working right lol. So them just copying the class file provided is their best bet at the moment
Hey guys, I'm currently writing plugin that (in theory) will allow me to paste multiple WorldEdit schematics near each other that will connect creating one large schematic. All the schematic sizes are standardized (64x64) before I take on this task I was wondering if there were any resources that you guys recommend I look at ahead of time to get an idea on the best way to do something like this.
Honestly shouldn't be too difficult to do at all. Paste a schem at x, y, and z, add 64 to x, repeat
WorldEdit documentation should cover how to go about pasting a schematic, then you're good to go. It's basically just a for loop from there
๐ Thanks, I figured as much just wanted to be sure there wasn't something I was missing like WE's pasting system being outdated these days or something
Nah. It's not too bad at all
By chance are you making some type of dungeon generator or similar?
If you are look into structure blocks
They work with raw NBT files buuuut theyre good for proc genned structures like that; its also how vanilla stuff like strongholds are made
Ya something similar, I've never looked into structure blocks but do have some experience with WE so I figured I'd try that way to get the results I'm looking for. Do you think it'd be more worth it for me to switch to structure blocks?
How can I check if a slot in a player's inventory has something in it? I am trying to check if the type of an item in the 36th slot of a player's inventory is equal to something but it gives me errors in console if the slot is empty. I need to check if the slot has something in it without using .getType() before I use .getType(). Anyone know how?
item == null || item.getType() == Material.AIR
^^^ null checking
k
so like
if (player.getInventory().getItem(36) != null && player.getInventory().getItem(36).getType() != Material.AIR && player.getInventory().getItem(36).equals(Material.LEATHER_BOOTS)) {
That would work yes, however there are some form things you could do to make it better
yea ik
I could put != null and != air outside so I can do for everything after and just return
then if statements
oh I forgot .getType
ItemStack item = player.getInventory().getItem(36);
if(item == null || item.getType() == Material.AIR) return;
if(item.getType() != Material.LEATHER_BOOTS) return;
yea
So I'm starting a large project, something larger than I've made up to this point. I have a lot of components that don't interact with each other all the time, but occasionally interact with each other. Would it just be better to break up each component into its own project file/jar rather than having one super big one?
Just for organization sake, cause I want to make everything as organized as possible to make it easier to debug and manage at a larger scale. - accidently posted this in #help-server lol
yes
that is kinda like what someone else had suggested
for example, if I'd split up components, I have land protection mechanisms and basically custom enchants mechanisms, which never interact except if i were to want to use a custom enchant to "buff" a players land protection
Three times getItem(36) omg.
Is there a known plugin for returning crouching to the old mechanics (pre 1.16). I want to prevent players from being able to crawl under a 1.5block space
want to know a secret to this so you are not dealing with hundreds of jars?
makes use of NFS and just symlink the jars you need into the directories of the servers ๐
then you only have singular jars to worry about and not literal hundreds of the same jar ๐
also makes updating easier as well
I used to run a fairly large network lol
well helped anyways
only one server, just a large project
well just make a note of that for the future ๐
a lot of people don't know the JVM is happy with symlinks lol
if I were you then, I would organize them in such a way that you had a master plugin, and then all the rest are plugins you can add to it as needed
your only downside of this is that you will have to expose the spigot/bukkit api as you need it for those other plugins
but that isn't all that bad since you can do it as its needed
what is a symlink never heard of them before
its basically a shortcut
its not the real file, just a file that points to the real one
god there is still so much I don't know xD sometimes I forget I've barely touched the entry level knowledge
no clue what a NFS actually is / does the name implies what it is, but what is the purpose of an NFS
to be able to update many directories without having to go to each one
๐ค so for scalability / updating you link together lets just say 100 or so directories so when you change the contents or add something to one its replicated?
yes the name implies exactly what it is
it is a resource that is accessible/linked via network
and it can just be a directory on another server
but NFS allows them to communicate securely though and the network resource is mountable
so if setup right, it just appears as like another HDD but doesn't actually exist on the all the machines ๐
works perfectly for jars because the JVM loads all jars into memory and thus won't use up network bandwidth except for when it loads up the jars ๐
hmmm interesting. I have a lot to learn when it comes to being system administrator still
I was the sys admin for this medium sized network ๐
I took an IT class but it taught me nothing was kinda lame I wish I got to atleast learn about interesting stuff like this
had like 20 dedi's I think there was
bruh my IT class taught me about the cable colors in 20 year old machines
should have taken a networking course then
wasn't an option though I could've gone through the tech colleges, but I opted to take Intermediate Java at the The University near my house this year instead
unfortunate that I have all these stupid Highschool requirements
I wanna just do my beloved IT and CS
oh still in HS
and mathmatics can't forget that <3
this is my last year I'm graduating early
networking would be better suited for you to learn things that would actually apply in running servers
for instance, on advanced hardware firewalls
you can implement protocols directly on them ๐
damn thats cool
I actually hadn't heard of hardware firewalls prior to last year
I thought they were the most interesting pieces of hardware I've looked at
my school brought some in and showed us
until you learn you can program the protocols for various software which is awesome because it makes it so much easier to do all kinds of other things
I think my weakest point in tech in general is networking
I have a very rough and rudamentary understanding
there is a lot you can do with knowing networking beyond just simply opening ports and all that lmao
I started all my tech stuff 2 years ago I'm proud I've learned as little as I have its such a huge industry
I am mostly self taught ๐
I also am self taught school courses don't actually do much for me
only thing I really got taught was a bit more things in regards to networking and satellite communications in the Army, but I pretty much knew most of everything already
aha mad respect for being in the army I wouldn't make it xD
surprised you are now learning I am a veteran
despite me having stated this like several times before
I knew just thought of that statement just now
and then once you thought you learned networking until you enter the world of virtual networking ๐
its a tough job a few of my cousins were shipped off Afghanistan and Iraq
and then that just opens all kinds of doors in possibilities. creating virtual lans where even though the servers are far apart they all appear on their own network and can see each other
and communicate securely
once you start getting into the virtual stuff my brain starts hurting xD
that stuff is insane to me
wait till you see the hardware
having to make jumpers with ethernet cords
where you go out one port, and come back in on another on the same hardware
Oh I'm a hardware expert I got a computer running last year I even got the Sound Blaster 3000 working
I am talking about a network switch
what tf is a jumper
jumpers tie ports together to kind of like bond them or to bridge
hmmm interesting
these are called physical bridges
there is software bridging and then there is hardware bridging
software bridging can do alright but it isn't optimal and so hardware bridging is far better
this makes me wanna see my schools servers xD they'd prob let me, but the thing is as soon as the school knows you are competent at tech they start watching you much closer
not really the case
if anything they would show you to the sysadmin who probably enjoy talking to someone who might actually understand
or if you are unfortunate they are a total idiot that manages to barely get by
this is our sysadmin
that sucks lol
also, another cool thing to do with networking and schools use it, is virtual desktop deployments/setups ๐
where all the desktops are actually on just a server as a virtual machine
oh I use it too not that my school knows
but yeah there is lots you can do
I had a semi-similar setup last year, but I stopped using it because tech people started cracking down on people for other exploits
lol
A senior friend of mine who graduated last year was essentially the only good tech guy in the school he handled all the chromebook repairs for their entire class
for some reason it takes 2+ weeks for our tech department to fix basic battery issues and other stuff versus just handing it over to my friend and having it back in 1 or 2 days
you could argue thats because of volume, but ordering a part for a standardized piece of hardware shouldn't take long
this is because there is a system that has to be followed for these things
it isn't always the case of the tech not wanting to do it, rather waiting on approval for things or waiting on some kind of part that needs to be purchased and then shipped etc. At my work, we sometimes get trailers in and we don't start doing work on it until like another month not because we can't but because it has a service due in that time frame and thus instead of having come back in for that service it is better to just wait that time out while it sits in the yard lol
how to add message spoiler text ( config.yml exam ) in plugin resource spigotmc
when I use event.getPlayer(), is it the same object if it's the same player or a different one? eg. if i add an additional field, can i retrieve it later?
It's the player that triggers the event.
I guess I'm asking if I can store data on the player object and retrieve it in future event calls
Sorry if I'm not being clear, I always wind up asking these questions when I'm tired af
Why not just create a variable outside of the event and save the player to it.
Player player;
@EventHandler
...
player = event.getPlayer();
That might work? I'll need to take another look when I'm more awake I guess
Like I'm essentially trying to have a field on event.getPlayer that returns different values depending in which player
Pro Tip: Don't code while tired. You'll wake up the next day, take one look at the code and have no clue what's going on?
I only have time on my pc when I'm tired
Unfortunately
But yea, hopefully that'll make sense when I look at while I'm walking tmr
Ty
Hi im having problems with this code but not sure why trying taking an item in the hand with default name gives this problem
Error: https://sourceb.in/25Mw2m3NTA
Code: https://sourceb.in/jeolpiwldE
Is there anyway to detect player open survival inventory?
declaration: package: org.bukkit.event.inventory, class: InventoryOpenEvent
I mean open player own inventory
I can detect open inventory like chest. But I can't detect open own ineventory
how do i not do 5 queries
they told you like a couple messages after that
https://bukkit.org/threads/open-player-inventory-event.402205/
Hope this helps a bit
we will need you to tell us the exact line its throwing the error since you sent a snippet
Don't think there is any way to detect it
its a clientside event yeah
Yeah
at least tell us which line the 69 is. (nice btw)
I fixed it
ah ok, just woke up, too late I see
I didnโt check if the item had a display name
Hi guys, I remember that there was a website that helped with nms obfuscation, smth like minimapper
does anyone have the link?
ty
Does playerInteractEvent work for right clicking only or also left clicking. I need a listener for when someone left clicks with a bow in hand
both
u can check with e.getAction() which returns an enum
theres like
LEFT_CLICK_AIR or LEFT_CLICK_BLOCK
just check if its either of those
beautiful thanks
u can do the hover with text components
its called a tooltip
theres plenty of tutorials on youtube
Hi guys, question. Where can I find a list of blockstate id?
Thereโs an event or something to check sign made by the player?
like when they place it?
I want to create a rank shorting system for tablist, but I don't really know how tablist works.
And after they typed the text change it too
a quick google search revealed a bukkit event called "SignChangeEvent", hope thats what youre looking for
By the description seem
is there anyway to detect press E key? (open inventory)
I tried it with PlayerOpenInventoryEvent but It didn't work ๐ฆ
No
Survival inventories are clientside
Only if the player clicks / interacts with it
Yeah
Experiment with it. Most likely just get the players inventory and set the items at those slots
The only one scuffed way around it is to use the open inventory advancement, and revoke after they open it
rawslots 1-5 iirc are the crafting grid
The home of Spigot a high performance, no lag customized CraftBukkit Minecraft server API, and BungeeCord, the cloud server proxy.
I tried it with packet
But failed... ๐ฆ
That was circa 2016 back in the 1.12 days
That got removed from the game
Yeah
according to that
Ahha Use minecraft basic achivement
XY, what's your goal?
thats probably if the variable ur modifying is a PlayerInventory



