#help-development
1 messages · Page 1393 of 1
right
The armorstand is used as a title which floats above the head of the player, but I don't want the player himself seeing the title
Just the other people around them
however, while packets may be more efficient in some cases, it is actually more difficult coding wise because there is a lot more variables you need to handle yourself from that point and can't rely on the server for.
is an armorstands custom title visible if you set the title visible but the stand invisible?
yes
Yes
thats how HologramApi works
Then no reason to use packets
Yes that is how you make HoloGrams these days
interactible holograms use horses
I don't want everybody to see the stand's name, that's why I'm trying to use packets
I was trying to just spawn all the armorstands at 0,0, and only teleport them for the players that need to see them
But it might be a better idea to use something like that metadata packet I believe exists to hide the title for some players
you are going to need to mess with like 2-3 packets then if I remember correctly as well as capture any packets that cause updates
wait, cant armorstands be in teams?
coz i remember the option existing to hide names for specific teams
Yes, just set it only visible to the team
I'll try that out, thank you!
that is a solution too, just good luck on the scoreboard stuff lol
HIDE_FOR_OTHER_TEAMS
then you can just use the correct spawn method and set the stand invisble with the correct custom name etc. https://hub.spigotmc.org/javadocs/spigot/org/bukkit/World.html#spawn(org.bukkit.Location,java.lang.Class,org.bukkit.util.Consumer)
How do you exactly remove the collisions of an armorstand? Do you do that with the setMarker method?
LivingEntity#setCollidable(boolean)
What it does?
depends how you coded it. If you are trying to modify the sign, can't do that async
um, crashed server with Async? We're you calculating teh movement of every atom in the universe?
depends on what that software you are gonna add does
yesn't
mh, I need to dig it more
it also never printed "a"
read javadocs
likely it says what it returns
*what parameters mean
basically ignore level restriction.
you just asked us what it means
try using getChunk().getChunkSnapshot() then work on that as it will have all teh blocks
sharpness has max level which is 5 level
how can i delete a chunk?
what does a snapshot do?
i already have the Chunk defined
if you want to enchant more than sharpness 5, use true
its a copy of teh chunk at that point in time
how can i get every block in a chunk
?
i dont understand this with "Math.IDONTKNOW"
pleaseee i need help
World w = event.getWorld();
int cx = chunk.getX() << 4;
int cz = chunk.getZ() << 4;
for (int x = cx; x < cx + 16; x++) {
for (int z = cz; z < cz + 16; z++) {
for (int y = 0; y < event.getWorld().getMaxHeight(); y++) {
Block block = w.getBlockAt(x, y, z);
if (block.getType().name().contains("SIGN")) {
System.out.println("a");
Sign sign = (Sign) block;
event.getWorld().getPlayers().forEach(player -> {
List<String> list = new ArrayList<>();
for (String str : sign.getLines()) {
list.add(filter(player.getUniqueId(), str));
}
player.sendSignChange(block.getLocation(), list.toArray(new String[0]));
});
}
}
}
}
what i use atm
just cut my own code
you just need the for loops
nothing else
yes i need the loop
and i dont know what in the loop
that was my question
but
thank you
@quaint mantle
for the help
List<Block> blocks = new ArrayList<>();
World w = event.getWorld();
int cx = chunk.getX() << 4;
int cz = chunk.getZ() << 4;
for (int x = cx; x < cx + 16; x++) {
for (int z = cz; z < cz + 16; z++) {
for (int y = 0; y < event.getWorld().getMaxHeight(); y++) {
Block block = w.getBlockAt(x, y, z);
blocks.add(block);
}
}
}
spoonfeed af, but there you would have a list with the blocks inside the chunk
If you are only interested in signs then use event.getChunk().getTileEntities() Then find the signs in that.
far less to check
i'll try it
there is no method getChunk() on player. Use a Proper IDE
yes there is
how the heck did you even manage to compile that
did someone say different server versions?
and i know that it works
read yoru stacktrace error
@long portal ideally you would make use of chunksnapshot for this as well, and would recommend using this method so you know which y values you don't need since in a chunk, about half to more then half the chunk is just air blocks
https://hub.spigotmc.org/javadocs/spigot/org/bukkit/ChunkSnapshot.html#isSectionEmpty(int)
declaration: package: org.bukkit, interface: ChunkSnapshot
bc i made another plugin with another function and p.getChunk is right
its in Paper btw
oh
nice
The server you ran yoru plugin on has no player.getChunk()
well the server say it doesn't have it
wait
again, read yoru own stacktrace error
nvm
Paper might have it, but spigot doesn't
or code your plugin to handle differing fork's
just go #getLocation().getChunk()
p.getLocation().getChunk() does exist on both though.
yep it does
ooooh right i can do that
This is why you code for the lowest denominator (Spigot) so you know it runs on everything.
wait are signs even tile entities?
They have a tile entity
well i code for nms
🙂
paper is awesome
MAAAANNN
imagine pinging a lot of people
The bot said nope
mod bots have no feelings
thats awful
Hello !
Sorry for pinging, I'd like to react to this message.
The "PersistentDataContainer" is part of API 1.14 if I understood correctly, how to do in an older API? (like 1.8 for example)
Hard coded NMS tags
What does "NMS" means ?
you handle persistence yourself and have pain
Oh okay thank you 😮
stop using legacy versions btw
^
1.16 is so much nicer to work with
true, but doesn't hypixel run 1.8?
Are you Hypixel?
They have own infrastructure, but this isnt a reason to stay on older versions
Not developper's choice
theres also a lot of 1.12 servers
We really need to get a total server player count by version somehow
somehow you have to be mass apealing. But i prefer coding for 1.16 exclusive too if i wanna use newer features.
1.12 is lightweight, this is the main reason
Old plugins I support do 1.8. Everything new I do 1.14+ as a minimum.
recently 1.16 only
1.15/1.14 is absolutely useless just cuz 1.16 exists
specifically blown up? or just destroyed/broken
Blown up because you use it in a dimension that's not the nether
Like
Like a bed in the nether or end
Block explode event I expect
?jd
package index
Thank you
Search box top right type event
wow i just realized changing sign text on chunk load is a very bad idea
because other players can place signs while the chunk is already loaded
I was wondering, is there any built in api to support rgb color in books?
pretty sure it does work
i found a plugin which can create colored books
let me see the code
it uses Main.java 🥲
it uses allman too
🥲 🥲
it seems actually pretty easy
nvm i found it. You just use BookMeta, get the contents and translate those into colors
Signs are tile entities right? Because this packet doesn't seem to fire
its a block entity
Does anyone have suggestions for Libraries to use? Just wondering what common ones people use and might recommend 😄
that will depend on what you are doing
kyori adventure may be handy sometimes
I do use that, very nice!
theres also aikars commands library
Yeah
and that timings lib for custom timings
I looked into Cloud and it seems intimidating to me, I started using Aikars instead
hikari and maybe idb from aikar? If you are using databases
I'm not the guy who likes a big ass builder either
do you maybe know the packet for that?
If using Aikar's do you still need hikari?
I didn't look too deep into it, but I did see Aikar's IDB and looked interesting
i think aikars uses hikari
why did i got pinged in here :o
That's what I thought too
This is my pom: https://paste.md-5.net/duvesariza.xml, the problem: I can't import NMS classes
spigot api doesn't redistribute nms
What do I need to add then?
either use a thrid party as codemc or put a spigot jar into a libs folder thats ignored
run buildtools and add spigot as dependency
Ok thanks
Wiki about the CI of CodeMC
protocolLib ✌️
well thats very case specific
idk i hate working with nms packets directly
It seems very interesting, but I have not dived into packets at all
When I do though, I'll have to check that out
anyone know why when my armorstand is moving in an arc, it just starts to go straight down while descending
of topic but can someone send me Java version 1.8_191 because someone at oracle has monkey brain and cant make a normal account system
i have tried 50 different password and they all dont work
help
use AdoptOpenJDK
This give me an error if I try to build with maven
package ... does not exist
Hey, I have betterrtp
I want to change the name of the message when it sends
So whenever players do /rtp it shows [Betterrtp] Teleporting....
Thats 4 words from the error report.A few more and we might be able to help.
How do I change the name of the betterrtp bit?
You added a local library and didn;'t run BuildTools
I ran buildtools
show yoru pom
remove teh local library
Why? Then my whole Intellij gives errors
in yoru pom change spigot-api to spigot
Can someone help me?
Contact the developer would I say
Ok fixed
now you can build with maven
Yes indeed
But don;t use artifacts. Use the maven lifecycles in the right hand side
How?
very right hand side of your IDE there is a maven tab
Yes
in there find lifecycles
Oh I can't build, it shows the same error
found
in the lifecycles run clean
Ok
I always run 'install and clean'
Not right, same error as 'packets doesn't exist'
never run install unless you really want it in yoru local .m2
Ok
clean and package
if its still saying it doesn;t exist with your pom updated you need to reset yoru cache
clean is success, package fails
I updated my pom and clicked on the maven refresh logo
Indexing took a while this time, I will try to build
Nope not working, same error
Oh I can import nms from v1_16_R3, but no others
then thats the version of spigot you built with BT
I want to use multiple nms from multiple versions
you have to build every version you want to use
Yes, so you build every version you want to support with BT
if I have someone set the name of a command in the config, how do I write the command in the plugin.yml
or is it not possible
You would have to mess with the command map or listen to the PreCommandProccessEvent
Event
ok thx
is PreComandProccessEvent the exact name?
or this
PlayerCommandPreprocessEvent
No that's from memory
ah ok
this?
Yeah
ok thx
where can I download OnlyProxyJoin plugins?
from the link https://www.spigotmc.org/resources/onlyproxyjoin.28/ I can't find it because it doesn't detect the file
...how would I use it?
you cant
thx
how can i use this PlayerCommandPreprocessEvent ? i need it to set a command name from config.yml
That is impossible: public class Sample extends ServerPing.Serializer
?
i want to disable a player from being able to use a sword, would it be overly resource intensive for me to listen to the player movement event and check if the player is holding a sword?
You can never extend reflected classes
im not extending it tho?
No, I am, and I want multiple version support so that is not possible for me
well you could try to just prevent that person from hiting something with that sword.
just put it into your listener class and do the things you want. Also remember implementing some kind of logic so the cmd is registered as existant.
because if you use that way it would be /somecommandbutwithredcolor
you likely can even do plugincmd logic instead, but im not sure if that works with cmds that aren't declared anywhere
whats you goal?
Setting a custom motd, hover, and playercount
I think you will only get further here with some intelligent reflection
and reflective class initialization
would you know how i can do that?
?jd
package index
@cerulean harbor you could always use entitydamageentityevent? I think that’s what it is called if I remember correctly. Just check the item material in the damager’s hand
is there a material that checks for all swords? or do i have to || every one lol
declaration: package: org.bukkit.event.player, class: PlayerInteractEvent
Not that I know of
i would in that case just do #getType().name().contains("SWORD")
Now that I think about it I’m pretty sure there is but I can’t exactly remember
but be aware its not very secure
in the sense that if someone names something sword?
or something else
ah
p.sendMessage(LinksMain.getInstance().getConfig().getString("command-1-message").replaceAll("&", "§"));
}```
oh wait
do you put booleans as char in a config
no? you save it as booleans
well it detects booleans and saved it as one
can i see your config? 
yeah that should be working ig 🤷
You shouldn't be handling commands like this, you should create separate classes for each command and register them instead of comparing labels, the only issue I'd see here though is if args[0] doesn't equal command-1-name, are you sure it's set?
are you using the mc weird & thing?
yyes
don't
non UTF-8 encoding
i just recompiled my plugin and this started happening
I suggest doing some debugging booked61, with command-1-name 
if I were to use different classes i would have the same command which wouldn't work
ok ty
im tired as shit but i have no idea what you mean
why cant i hook into vault economy
main class: https://paste.md-5.net/ulicaqexey.cpp
economy class: https://paste.md-5.net/mevanejoju.java
in that main command it is /linkcommand but if I added another class, it would have to be the same command which you cant do. you cant have two commands that are the same thats why i wanted to use one class for commands
do you really want to return null for all of these?
How I can make what a mob spawn to all the players with a delay of 30minutes is for a plugin
im just trying it out before i do something with it
@dusty herald
getServer().getServicesManager().register(EconomyHook.class, economyHook, this, ServicePriority.Highest);
you should register the vault interface Economy.class rather than your implementation
https://paste.md-5.net/oqayugakav.java you could do it like that just replace instance with main class yours
ohh my intellij maybe renamed that when i changed class name
yes i'am doing this
you are??
but idk how can spawn a mob to the player position
oh
to all the platers
get the player's location, spawn a mob
"players"
loop through all players, spawn a mob at their locations 
and how i can get the players position is my question
player.getLocation()
Player#getLocation()
ty @unreal quartz it works
well you delete the world before unloading it
i'm pretty sure there also needs to be at least 1 world, otherwise players have nowhere to go
and also you can have your plugin load before the worlds get loaded for the first time, you can just delete the folders there
I have a problem
what problem
with instance
package me.TheWood.org;
import org.bukkit.Bukkit;
import org.bukkit.plugin.java.JavaPlugin;
public class Main extends JavaPlugin {
@Override
public void onEnable() {
Bukkit.getScheduler().runTaskLater(instance, new Runnable() {
@Override
public void run() {
// do the code
}
}, 20 * 1800) // 1800 is 30 minutes
}
@Override
public void onDisable() {
}
}
what change
replace instance with this
Well its for a manhunt server, and I want it to completely reset world after game end, without restarting the server. @unreal quartz
that would be impossible unless you have a buffer world to house players
with what ¿?
I kick the players before reset
with "this"
might still cause issues, not sure
thanks
yw
The problem is that it doesn't generate a new world
awesome did you call the world create?
oh no ur not
You can;t delete world
this.world = Bukkit.getWorld(""); ?
also !world.equals(null)
I once called: worldcreator.createWorld and I also called Bukkit.getServer().createWorld(worldcreator);
print the actual outcome of this line Bukkit.getServer().unloadWorld(world, false);, it is likely it is failing
how I can get what player reference to the player
I'm betting your latest.log will have some interesting errors
player isn't reference to nothing
you need to create a player
how
like are you trying to get all players on server?
yes
I think it works because there is a massive lagspike and a bunch of void chunchs for like a minute which only happens at world start or if the world isn't loaded (on my test server)
for (Player player : getServer().getOnlinePlayers()) {
}
package me.TheWood.org;
import org.bukkit.Bukkit;
import org.bukkit.entity.Player;
import org.bukkit.plugin.java.JavaPlugin;
public class Main extends JavaPlugin {
@Override
public void onEnable() {
Bukkit.getScheduler().runTaskLater(this, new Runnable() {
@Override
public void run() {
for (Player player : getServer().getOnlinePlayers()) {
}
player.getLocation();
}
}, 20 * 1800);
}
@Override
public void onDisable() {
}
}
or I change any
you need to put the player.getlocation into the for
you should basically learn java first before spigot
yes i know
how would i replace the scoreboard without making a new scoreboard?
ig you could just do runnable?
[19:34:13 FATAL]: Thread Craft Scheduler Thread - 55131 - EssentialTools failed thread check for reason: Asynchronous scoreboard creation```
You make a team per line in the scoreboard.
??
each line of the scoreboard is a team with a prefix and a suffix to make up the text of the scoreboard
hold on lemme link code
Team team = scoreboard.registerNewTeam("TEAM_" + index);
index being the line number on teh scoreboard
each team has a name which you use to get them, I used to just use colour codes for them
here's my code for the scoreboards
at the end of the day you need to remember what the scoreboard actually is, a place to represent scores for teams not a place for information (it was never designed for that)
package me.TheWood.org;
import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.entity.EntityType;
import org.bukkit.entity.Player;
import org.bukkit.plugin.java.JavaPlugin;
public class Main extends JavaPlugin {
@Override
public void onEnable() {
Bukkit.getScheduler().runTaskLater(this, new Runnable() {
@Override
public void run() {
for (Player player : getServer().getOnlinePlayers()) {
player.getLocation();
Location loc = player.getLocation();
spawnCreature(loc, EntityType.SKELETON);
}
}
private void spawnCreature(Location loc, EntityType creeper) {
// TODO Auto-generated method stub
}
}, 20 * 1800);
}
@Override
public void onDisable() {
}
}
this are correct or change any
whats the goal of this?
spawn a mob in the player position with a delay
Okay, well random question
player.getLocation();
whats that for?
that line
it does nothing
:/
oh I forget to delete thisxD
I want what the task repeat infinity times
Guys does anyone know a good command manager?
then you'll need to create a repeating task, as runTaskLater runs once
With stuff like auto completion argument parser etc...
scheduleSyncRepeatingTask
how i can make what repeat more what one time
Thanks, Am I able to modify messages or this one use minecraft hard coded error messages?
you can modify messages
Hey, I'm using java11 to compile but started the project with java14, any idea how to fix this?
. @unreal quartz
What is your build system?
recompile your plugin in java 11
how can I do that in eclipse?
it uses Java 14 features thus it doesn't load in
so does it work or not? lol
So it works
Depends on your actual build system
But not the new world generation
Eclipse JDT (please do NOT use that as your build system), Maven and Gradle all have different ways of specifying that
idk how to say it, but i hate and love this at the same time
well I'm using eclipse jdt
Oh no
so.. it doesn't work
I guess
Project properties -> java compiler -> Set the compiler version to a lower version
get good guide:
- install intellij
- Get maven
- Get good at maven and then move to gradle
- Decide if you like kotlin
Right, though I already switched from java 14 to java 11, the class file version is too high though,
Don't move to gradle randomly
im not saying anyone should do that randomly
look for errors, check the outcome of the line Bukkit.getServer().unloadWorld(world, false); (it returns a boolean), because I doubt that is actually doing anything since this is how you get the world this.world = Bukkit.getWorld("");
Okay will try, will send results in abit
So it returns false
For the overworld
But true for the nether
well you probably cannot unload the world then
unless you create a new one, before unloading it
Like what order?
enchantglint for blocks. any way?
Nbt Tags?
Which enchantments?
any enchantment
why my DAmage Indicator doesnt work? can anybody help me?
sry bro, no clue what DAmage ist
oh damage
I thought like DAimage or smth
Where??
what? xD
Like where doesn't it work
Cause like I don't get it
f.x with mythic mobs
what is f.x ?
XD for example
?
How i can make what this repeat more than one time
i have a question what does the true or false does in the onCommand class?
package me.TheWood.org;
import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.entity.EntityType;
import org.bukkit.entity.Player;
import org.bukkit.plugin.java.JavaPlugin;
public class Main extends JavaPlugin {
@Override
public void onEnable() {
Bukkit.getScheduler().runTaskLater(this, new Runnable() {
@Override
public void run() {
for (Player player : getServer().getOnlinePlayers()) {
Location loc = player.getLocation();
spawnCreature(loc, EntityType.WITHER_SKELETON);
}
}
private void spawnCreature(Location loc, EntityType creeper) {
}
}, 20 * 1800);
}
@Override
public void onDisable() {
}
}
True return blank in game chat, False returns the defined command syntax
?paste
for (int i = 0; i < howmanytimesyouwannaspawn; i++) {
Location loc = player.getLocation();
spawnCreature(loc, EntityType.WITHER_SKELETON);
}
okay ty
What is "what this"?
I want what repeat infinity times
for a skeleton spawn in the player position with 30minutes of delay
I mean whatever gets I guess
what do you mean by 'what repeat infinity times'?
what never finish
I am not sure but it looks like it will execute every game tick just saying...
Oh my bad
Didn't see that part
explain more what you wanna do
So then whats the problem
i dont really get it
what allways a skeleton spawn in the player position with a delay of 30m
Oh the skeleton is supposed to spawn 30 min later?
Based on the position of player 30 minago
you are spawning wither skeleton after 30 minutes for every player
Does anybody still have any idea how to make UnloadWorld not return false?
show code
im gonna try it
Thx 🙂
Out of curiosity why?
Why I can
yeah
Has your issue been solved yet?
anybody?
yay
Alright then, saves me from typing lol
If you want to I still have an issue 😦
I'm looking at yours now
Thx
Try calling the unload before your delete world function
If that doesn't work, after wc.createWorld call Bukkit.createWorld("world");
Okay
@keen monolith sry i am still working on it
No worries
Guys, quick question, is there any down side to make my custom commandManager on top of spigot CommandExecutor?
That didn't work trying second suggestion
But wait still doesn't fix the unload world issue
hey, I'm new to plugin dev but I have developed forge mods before and have a lot of experience with C#. I'm wondering if spigot allows the creation of custom TileEntities?
imma take a wild guess
TileEntities doesn't exists but there are several workarounds
package index
declaration: package: org.bukkit, class: Bukkit
I know but it returns false
what
are you giving the right world name?
does anyone know how brigadier implements command completion?
What would be a good way to ovveride the /about commands and such? would I need to do a plugin or edit the spigot itself?
okay @keen monolith i have this code https://paste.md-5.net/adaxotesik.java the only problem now is that it doesnt make new world so ill fix it somehow
Ah.. do you know of any open source plugins I can look to see how they do it?
Hey everyone, was ondering if any ome can give me a indication how can i see via code what form a fence has?
I imagine the biggest issues are saving the state and detecting when the block is destroyed (esp. with worldedit etc). That might be possible to do with NBT though I feel like there are better options
do you mean like the Material for fences? 🤔
no that i can do, for ex. a fence can be strait or a corner or only left connect or right connected
You can not unload the main (OVERWORLD). It is blocked in the MC source java if (handle.getDimensionKey() == net.minecraft.world.level.World.OVERWORLD) { return false; }
So then what do I do?????
You ignore teh main world and use your own
Its the only solution. I just checked the Source to see if unloading the main was possible. I had a feeling it wasn't as world index zero is alwasy the main overworld
yeah i think the overworld isnt possible too
so i think you should do something like change the world name to something else in server.properties and then like teleport players always to the an new world
Its not I check the source.
If the world name is null, its not loaded or is the overworld it aborts
how do i ovveride a command like /about?
how I can edit the stats of the mobs ¿?
register the command via plugin.yml or do some voodoo magic with Reflections
Alright ill do reflections
How I can edit the mob stats ¿?
wdym by stats
what ¿?
wdym by mob stats
mine?
@quaint mantle fixed one world gen error, delete world change it world != null
its from boku no hero academia its izuku
show the full code
no it's naruto uzimaki
public void deleteWorld(World world) {
if(world != null) {
Bukkit.getServer().unloadWorld(world, false);
Bukkit.getServer().unloadWorld(world, true);
}
}
I meaning of for example double the attack of the zombie
listen for the entitydamageevent and get the damage then double it and set it to the entity
@keen monolith ig i fixed it
just doing some bit of fixes and things
I can make it in the main class ¿?
yes
i dont wanna be mean or smth but learn java and then watch tutorials for the spigot plugins
if you dont know that you can listen for an event in your main class you should really do tutorials first
smth like this could help https://www.youtube.com/playlist?list=PLFE2CE09D83EE3E28
thanks
Is anyone here familiar with mcmmo
no
@keen monolith https://paste.md-5.net/mepemefula.java
You speaking of the API? A bit. But only the new one.
try this
I am trying to see if it’s possible to add custom items to the mcmmo treasure table
Ik how to configure it to use vanilla items but I want to add things like crate keys
Not via the api
thx
so it works?
You can hook into this event
I’m not sure what you mean by the api, I was directly editing the source code
Then you can go directly into
https://github.com/mcMMO-Dev/mcMMO/blob/master/src/main/java/com/gmail/nossr50/config/treasure/TreasureConfig.java
And extend the abstract Treasure class then add them to the table. There is some
validation going on so make sure to not break everything ^^
Still updating my code
okay
Thank you that was more than I was hoping for
did you add load: STARTUP to plugin.yml
no
try
Guess that is kinda important
i added it to mine
Kk
Pretty sure I just crashed my VM, had like 30 thread dumps and 5 hard crashes going
weird
No worries, the host sucks
ohh
Like its a crummy laptop from like 2016 with like -500Gb Ram and a non-existent processor
we've all been there
its nearly done booting
@quaint mantle still throws that error
😩
Why oh why oh why
just for reference
What are you having problems with?
Will Pavlyi wrote a cracked class
.
And it doesn't work on startup
Yes. You cant create worlds on STARTUP. Any reason why you dont load POSTWORLD?
Bwt } catch (NullPointerException ex) { <- This here is a big fat no go.
You want to prevent try catch blocks at most costs. Only use them if you are absolutely forced to. IOExceptions for example.
This here can just cripple your code and hide really important errors.
NullPointerExceptions should never be catched but always be resolved.
umm 'System.out.println("MapHunt world doesnt exist!");'?
use conditionals if you want to check for null
oh um ty idk why it didnt fix your problems
But it helped
oh thats nice
Does someone have an good anticheat base?
alice
Next thing:
Dont access any Spigot API in onLoad this is called way before anything bukkit related is even initialized.
Hey
How can I shade MongoDB with maven?
<build>
<plugins>
<plugin>
<artifactId>maven-shade-plugin</artifactId>
<version>3.2.2</version>
<configuration>
</configuration>
<executions>
<execution>
<phase>deploy</phase>
<goals>
<goal>shade</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<dependency>
<groupId>org.mongodb</groupId>
<artifactId>mongodb-driver-sync</artifactId>
<version>4.0.1</version>
<scope>compile</scope>
</dependency>
I have this
except it throws me this error "cannot find symbol"
private DB clanwarsdb;
private static DBCollection players;
private MongoClient client;
here
Is that the exact err code?
Does it say what symbol it can't find or any more detail?
Using Eclipse or Intelij?
IntelliJ
Using Artifacts to build?
Yes
Don't
I'm using maven now
Right hand side, Maven tab, Lifecycles clean pacakage
then it will be shaded
What will?
Open your jar with any zip explorer and check teh mongo is in there
Also make sure you are using the correct jar. The one in teh target folder
?paste the full build log
then build again using the lifecycle clean package
if that fails, shoudl you be using mongo sync and not mongo core?
Try this here and also load your plugin POSTWORLD
https://paste.md-5.net/faxolotoli.java
it worked now
idk how to make a working furanceInventory there smelt Default repeices, i'm really lost
but I will adopt the cleaned up code
🤔 could this be a source of the error
How do y'all test and program at "same" time I find it very inefficient to always run git to build copy paste jars and restart/reload server. Any better ways to do this ?
I can only find a beta1 driver
<version>4.3.0-beta1</version>
oh yeah
wdym static imports
no manually added libs
both of those look like manually added and not maven
basic question:
ChatColor.GREEN + "" + ChatColor.BOLD+"Test Menu"
is that enough to make a text bold?
You don;t need the + ""
im getting an error with my scoreboard plugin when running 1.12.2, how would i make it compatible with 1.12.2?
java.lang.NoSuchMethodError: org.bukkit.scoreboard.Scoreboard.registerNewObjective
Did scoreboards exist in 1.12?
yes
and 1.8
they were added in 1.5
also the error was pointing to this line
Objective obj = board.registerNewObjective("scoreboard", "dummy", title);
show the line thats causing yrou error
ok, in 1.12 the method is registerNewObjective(java.lang.String name, java.lang.String criteria)
ill try that, how would i set the title though?
There seems to be no title in 1.12
hey
i think its the 16 character limit
so ill have to do some magic
with suffixes i think
Huge Thx works fine, only issue that remains now is that nether portals and nether spawning is bugged
what u could do is ditch the Java aspect, make a script that deletes the world folders each time you start the server and have spigot run it each /restart
ok but how
There is an exploit...
mm yes
explain pls
the well known script exploit
Let's just I do things other than Java (Hacking=
that lets someone tracert ddos your mac address
can u explain this script exploit
no
Im curious now
he's a l33t hax0r man
Cause legal stuff
we cannot comprehend such hacks
No
🤷♂️
my guess is that he's on a shared host and they don't let him upload batch/bash files through ftp
It's just I don't know any of u
Most likely, though if there is an actual exploit I want know so I can avoid it
figured
like yes, you can make the script open all ports and nuke your server
but that's you exploiting yourself
not someone exploiting you having a script
I was thinking a simple bash script that nukes the world folders between startup lmao 
because I think that's something that they want to do I'm kinda confused, they've been trying to achieve it for the past few hours
they seem kind of dum
Thx, noted 🙂
also I remember you from a couple years ago in Shockbyte chat
I used to work for them
well

FurnaceInventory invfur = Bukkit.createInventory(p,InventoryType.FURNACE,"")
player.openInventory(fur);
why is it not smelting?
how do i set which half a door block is ?
BiSected TOP and BOTTOM
can you explain your username ive always been curious
the case of the first 4 characters is hand picked, everything else is random
its his pw
I want to have something like
p.sendMessage("blah");```
I have this:
```if (LinksMain.getInstance().getConfig().getBoolean("discord-enabled"))```
but i dont know how to set it so i can see if it is false.
why not
prefix with ! to invert it
if(!blab)
if blah = true, then !blah is false
oh shit ur right i forgot
are u ok
real men xor with true
its already a boolean, you don;t need to test any further
and yeah
oh wait since its boolean i need like a .equals or smth i can't use !
hmmm
no. Thats all teh code you need, is what you already have
Should i use placeholderAPI if i am only using my own proprietary plugin, aka scoreboards controlled by my plugin due to different boards showing at times, and most likely me also implementing a board header myself
if (LinksMain.getInstance().getConfig().getBoolean("discord-enabled")) {
//code
}```
i already have that but that only works if its set to true
yes, use a ! to invert it
if (!LinksMain.getInstance().getConfig().getBoolean("discord-enabled")) {
//code
}```
hmm ok ill try
i'm trying to open a furanceInventory to smelt items
but idk how to do it sense it doesn't work for me
the code you pasted before was nonsensical
at any rate, i'm not sure if a detached furnace inventory without a backing furnace tile entity is going to do anything
the actual smelting that happens is a result of the tile entity being ticked
I think a FurnaceInventory has to be backed by a an Furnace instance.
you could make it smelt manually though i guess
The smelting is applied in the TileEntityFurnace class. The inventory itself does nothing.
yeah, you would need to do the smelting logic yourself
not sure if that's possible without protocol fucknuggetry though, idr if the furnace inventory has methods to set stuff like smelting progress and whatnot
If you are willing to use NMS then you could actually just create an instance of TileEntityFurnaceFurnace
as it has a no args constructor
yeah i'm not that good at coding and
i'm kinda not great at NMS
look @ the furnace inventory interface then I suppose, and reimplement smelting yourself
those are your 2 options basically
apart from giving up
thank you for leting me know
atless i know now 🙂
much appricated
is protocol easy to use?
i'm kinda basic
Its has a pretty steep learning curve. So you will def struggle for a while.
thank you! for telling me
You could just create a furnace at Y level 0 in teh nether, then change it back to bedrock once finished
you could
And if multiple people use the gui you just kick them
brilliant
For misusing your gui
Or just increment its placement as each player opens it
or cancel open furance at 0 0 0
if they tries
what if there are more players using the gui than you can fit furnaces into loaded chunks?
ad the location to a map so you can easily replace the block/remove the entry
i guess you could force load chunks with plugin tickets 👀
That would be a LOT of players
16x16 = 256
So thats for one chunk
what is my nether only has 1 block thick bedrock floor
or get player location get y 0
yep
but how would i replied instance?
you store teh location when you open the furnace.
when the furnace is closed you get teh location from teh map, set the block back to bedrock
Then two people standing above of each other will break the ui
just create a new world for your furnaces
this
that way it doesn't fuck with the gameplay and assume things about the server
yep, easy to create a small world
thought of just tell them to not stay at same spot then opening
that said it is still a pretty dumb idea
one no one can ever goto
😂
furnace world nice
like, granted, I don't really see any other way for you to reasonably do it if you can't do protocol nor nms
but it's still super tacky
Many games use a storage world for things like this.
such as
an instance no one has acces to to put things you game needs
Asherons call (an MMO) did it
use world/chunk pdc for arbitrary data
this make me think of Minecraft vanilla maps
schematics for block data
and just raw db/flatfile for data that isn't bound to a location
the only excusable case of creating a world and fucking with blox that I've seen to date is worldedit's chunk regen, which uses a temporary world to generate fresh chunks
Hello!
Why I'm getting this error. I couldn't see a mistake (version 1.16.5)
I just dont know anymore
While trying to use buildtools
to install Spigot
It tells me Build Successful but the Buildtools folder is empty and no Spigot Jar is to be found
Inventory::contains takes an ItemStack
you are giving it a String
ItemStack::getType will never return null; your != null condition is redundant
If the BT folder is empty you didn't run that BT
wgt are you trying to get a material named Help Page
I ran it
ups there is a mistake but
i cant found a inventory.getTitle
@echo off
IF NOT EXIST BuildTools (
mkdir BuildTools
)
cd BuildTools
curl -z BuildTools.jar -o BuildTools.jar https://hub.spigotmc.org/jenkins/job/BuildTools/lastSuccessfulBuild/artifact/target/BuildTools.jar
set /p Input=Enter the version: || set Input=latest
java -jar BuildTools.jar --rev %Input%
pause
Command that I used cause it was recommended
you can get it from the inventory related event
and then get the title from the view
md5 in his infinite fucking wisdom has decided that inventories do not have titles
I still have messages like this
that curl isnt a recognized command (mostly fixed)
java exceptions
and stuff like that
and your saying there is only the jar that the curl downloaded in your BT folder?
ok thats why then
Please explain
If the curl command failed it would not download any buildtools.jar
oh, you mean public void onClick(InventoryView e){?
e.getView