#help-development
1 messages · Page 1575 of 1
i tried that once with the same issue and i had issues with doing it same tick
i dont remember the error but i had to delay a tick to get it to work properly
on the event wait 1 tick and remove the empty normal bottle
cancel the event, do your stuff, decrease item in hand (or offhand!) count by 1
or like gecko said cancel and remove the honey bottle and add the custom one
either way works
although mine is easier 🙊
eh that's a matter of opinion honesty I'd say either way is very easy
harder to track the empty bottle
true
what happens if the player drinks it with a full inventory
inventory check?
also 1 tick delay would solve that
bottle consumed wait 1 tick remove empty add custom
if the player drinks it with a full inventory, it would drop on the ground...
not if there is more than one
in your case there are many variables that can occur in a tick with an empty bottle: being thrown out, moved around, etc
System.out.println(player.getName()+ "'s money:");
System.out.println("balance: " + PermissionShops.economy.bankBalance(player.getName()).balance);
System.out.println("amount: " + PermissionShops.economy.bankBalance(player.getName()).amount);
how i get the economy object
RegisteredServiceProvider<Economy> response = getServer().getServicesManager().getRegistration(Economy.class);
economy = response.getProvider();
output
[03:22:31 INFO]: misdocumeno's money:
[03:22:31 INFO]: balance: 0.0
[03:22:31 INFO]: amount: 0.0
tho if i do /money or /balance i get what i have. am i doing something wrong in that code? or its bc the economy plugin is essentials and not vault?
im using both, vault and essentials
bankBalance is different from the normal balance i think
you right, it has to be economy.getBalance(player)
thanks
hasPermission will always be true for ops?
are you sure you are including the plugin.yml in correct folder?
what is the best way to listen click events for menus
Inventory Events?
I mean other than checking the title of the inventory
is there a way to disable a player from using any command (without changing perms?)
declaration: package: org.bukkit.event.player, class: PlayerCommandPreprocessEvent
See if this helps, cancellable
thanks 🙂
checking the inventory itself
or some may say holder is good too, can be neater
will hardly recommend comparing titles of inventory views
can I use PersistentData for it?
why would you
dun think so
menu should be recreated when your plugin enables or whenever the player view the menu
Hello how i get length of results?
code:
ResultSet result = PVP.plugin.getManager().getSQL().query("SELECT * FROM PVP_stats ORDER BY 'kills' DESC");
length or size
I am loading the menus in the memory
columns or rows
and then just opening them with command
rows
like if have in data 5 players so print 5
so how i get the size?
https://paste.md-5.net/tehawotafi.sql
https://paste.md-5.net/lanaduvado.css
1st is error
2nd is plugin.yml
help
you may have to iterate and move the cursor
and increment the count
Isn't it "author" and not "authors"?
authors is a thing
Ok thanks
i've tried author too
i think a plugin description is required
i don't think so
@torn oyster This one maybe softdepend: ["PlaceholderApi", "LuckPerms"], remove all the "
or do this
ResultSet rs = ...;
rs.last(); // Moves cursor to last row
int noOfRows = rs.getRow();
Just try it and change it to author
Wait, where is your plugin.yml file located?
I know.
./resources
in resources
its not plugin.yml anymore anyway
Class.forName("com.mysql.cj.jdbc.Driver");
setConnection(DriverManager.getConnection("jdbc:mysql://" + host + ":"
+ port + "/" + database, connectionProps));```
that is whats causing error
DriverManager.getConnection
is the main error
can someon help me make gui
The home of Spigot a high performance, no lag customized CraftBukkit Minecraft server API, and BungeeCord, the cloud server proxy.
mk
`public boolean ifSuicide;
@Override
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
if(command.getName().equalsIgnoreCase("kys")){
if (sender instanceof Player) {
Player player = (Player) sender;
player.setHealth(0);
player.sendMessage(ChatColor.GRAY + "That was too eazy, " + ChatColor.RED + player.getDisplayName());
boolean ifSuicide = true;
}else{
System.out.println("You can't execute this command from the console!");
}
}`
@EventHandler public void onDeath(PlayerDeathEvent event){ if(ifSuicide == true){ event.setDeathMessage(""); }else{ event.setDeathMessage("Die!"); } }
does anyone know whats wrong?
trying to disable the death message only when the "kys" command is executed
if(ifSuicide == true){ - makes no sense.
Since if (ifSuicide) <- is already the thing you want
boolean ifSuicide = true; <- Does you IDE doesn't show you any error?
ifSuicide = true; would work
nope it doesnt
Without the boolean
so like this?
?
@EventHandler
public void onDeath(PlayerDeathEvent event){
if(ifSuicide){
event.setDeathMessage("");
}else{
event.setDeathMessage("Die!");
}
}
Yea
But the boolean is now forever true 🔨
wait so what do i do
what im looking for is to only disable the death message when that command is executed
Well, you have to set the boolean back to false
how tho
@EventHandler
public void onDeath(PlayerDeathEvent event){
if (ifSuicide) {
event.setDeathMessage("");
ifSuicide = false;
} else {
event.setDeathMessage("Die!");
}
}
🙂
hmm that still says "Die!" when you execute the command...
Please send us your full class ^^
sure
?paste
wait
Whatever 🤷♂️
it doesnt send it when i die naturally
?help
selfrole Add or remove a selfrole from yourself.
cleanup Base command for deleting messages.
embedset Commands for toggling embeds on or off.
info Shows info about CafeBabe.
licenseinfo Get info about Red's licenses.
mydata Commands which interact with the data CafeBabe has about...
set Commands for changing CafeBabe's settings.
uptime Shows CafeBabe's uptime.
customcom Base command for Custom Commands management.
findcog Find which cog a command comes from.
names Show previous names and nicknames of a member.
casesfor Display cases for the specified member.
listcases List cases for the specified member.
reason Specify a reason for a modlog case.
permissions Command permission management tools.
Oh gosh
👍
Not only
how tho
Well
#getCommand(String command)#setExecutor(new YourCommandClass());
- you have to implement the CommandExecutor class
Or im just lost rn and it works without it in the main-class lol
it does work
Yes if in the main class all commands in that plugin.yml will go through the main class.
so no need to register then
so any idea why does that not work?
whats in your plugin.yml?
commands:
kys:
description: You will die.
usage: /<command>
aliases: [kms, killme]
?paste
Depression plugin
Yea the command is pretty weird tho
pluign,yml is fine
was just a dark example
i mean, essentials has /suicide
Does the plugin do anything at teh moment?
Well but "kys" is much weirder
my problem is not the command not working tho
yes both the kys and revive commands work
fine
its not killing them?
it is
Coca Cola eskumma
Then whats not working?
but the deathmessage doesnt work as it should be
i want the deathmessage to not disaplay when they execute the kys command
and make it display when they die naturally
hi so uh i build finish a plugin and i got the file with me now, i want to test it but how?
The death message is sent to other players. Not sure you can remove it
when i leave it default it says "<player> Died" when you execute the command
When I set the deathmessage to be "" it doesnt say anything which is what i want but
On death events it’s e.setDeathMessage() but that’s death events
i want it to say "" ONLY when they execute that command
@EventHandler
public void onDeath(PlayerDeathEvent event){
if(ifSuicide){
event.setDeathMessage("");
ifSuicide = false;
}else{
event.setDeathMessage("Die!");
}
}
alr
that somehow worked!
thank you so much
hey guys, does changing the colour of somebody's display name also change the colour of their name tag?
Depends on how you change the color
If it's with teams then it changes in both places
Not sure if that's going to work but you can always try it
use lunar client
Thanks
does "player.setInvulnarable(true)" work on 1.8.8?
No
alr
/depress @reef wind
How do I get a players persistent data container?
#getPersistentDataContainer 
I don't have that
you do if you are using the right version
I just wanted to learn how to use it
will persistent data container work on 1.13 if I make with api 1.14?
obv. not
bruh
will a feature from version 3123.13 work in version 1.2?
no lol
see
I can't find boolean in PersistentDataType. ... what do I do?
(Byte) 1
oh so It's a byte
Hey, I'm currently working on my own world generator and I'd like some advice on how to create biomes. I mean, I will be able to break the map into "pieces" and manipulate blocks, height and terrain in them. My code:
@Override
public ChunkData generateChunkData(World world, Random random, int chunkX, int chunkZ, BiomeGrid biomeGrid) {
ChunkData chunk = createChunkData(world);
SimplexOctaveGenerator generator = new SimplexOctaveGenerator(new Random(world.getSeed()), octaves);
generator.setScale(scale);
for (int z = 0; z < 16; z++) {
for (int x = 0; x < 16; x++) {
double noise = generator.noise(chunkX * 16 + x, chunkZ * 16 + z, frequency, amplitude, true);
int height = (int)(noise * 15.0 + 50);
chunk.setBlock(x, height, z, Material.GRASS_BLOCK);
chunk.setBlock(x, height-1, z, Material.DIRT);
for (int i = height - 2; i > 0; i--) {
chunk.setBlock(x, i, z, Material.STONE);
}
chunk.setBlock(x, 0, z, Material.BEDROCK);
biomeGrid.setBiome(x, z, Biome.FOREST);
}
}
return chunk;
}```
what does this do?
if (event.getView().getType() == InventoryType.PLAYER) {
return;
}
(InventoryClickEvent)
Nothing as a View isn't an inventory type
um I'm wrong again, it seems it is
Determine the type of inventory involved in the transaction. This indicates the window style being shown. It will never return PLAYER, since that is common to all windows.
so I was half correct, that will do nothing. It is never a PLAYER type.
oh ok
java.lang.IllegalArgumentException: Must supply additional paramater for this statistic
what does this mean?
the error is coming from MINE_BLOCKS
you have to specify the blocks
yea, how i specify all
i did it something like this
public static int getTotalMinedBlocks(Player p){
int total = 0;
for (Material m : stoneBlocks) {
total += p.getStatistic(Statistic.MINE_BLOCK, m);
}
return total;
}
private final static EnumSet<Material> stoneBlocks = EnumSet.of(
Material.STONE,
Material.ANDESITE,
Material.COBBLESTONE,
Material.DIORITE,
Material.GRANITE,
Material.DIRT
);
can i use it?
oki
It's not
loot_tables vanilla work on spigot server?
Depends on what you mean
What's the right way to handle upgrading from 1.16 -> 1.17 with code like this?
net.minecraft.server.v1_16_R3.Entity
?1.17
Install 1.17 with BuildTools: https://www.spigotmc.org/wiki/buildtools/
and 1.17 doesn't use net.minecraft.server package anymore
it is net.minecraft.network. something
So you wanna manipulate the client? Just shade it in 🐮 /s
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
if (sender instanceof Player) {
Player player = (Player) sender;
String page = args[0];
}
}
Caused by: java.lang.ArrayIndexOutOfBoundsException: 0
at pvp.pvp.commands.Top.onCommand(Top.java:43) ~[?:?]
Top.java:43
String page = args[0];
anyone help?
Well ArrayIndexOutOfBounds
Don't access something out of bounds
?learnjava If you want docs it should be covered in these
Here are some links to get you started on learning Java:
- https://www.codecademy.com/learn/learn-java
- https://www.sololearn.com/learning/1068
- https://www.learnjavaonline.org/
- https://programmingbydoing.com/
- https://docs.oracle.com/javase/tutorial/java/index.html
The last one is the only official one, however some of those concepts assume that you already know a bit about programming.
check for the length before accessing something you might not have
You can’t access the first arg if it doesn’t exist
so how i create them?
i tried new String[1]
Is there a way getting the last time a world got loaded?
That’s stupid
Why are you creating an argument
You’re just fetching the command dispatch result
so how to do this -_-
Potion deprecated, what the alternative?
if (args.length >= 1) {
args[0] // <— here that would be acceptable
}
this is an good tutorial https://bukkit.org/threads/tutorial-command-arguments.186497/ it's an bit old but still works
Hello!
This tutorial will be on command arguments. Basicly, how to do a command with multiple arguments.
Requested by: @PieMan456
Alright,...
?jd-s doesn’t this say anything?
It does
yo how do I detect if a user right clicking an armor piece will equip it
PlayerInteractEvent presumably
new Potion(PotionType.INSTANT_DAMAGE, duration); what the new way to do it?
Check ifs a right click and involves an item
yea but if you look at a block depending on the block it wont equip it
there is no offical way to do that
PotionEffect
Thought block interaction was post item interaction
Oh right
if canceling doesn't work, set the equipped armor back
@frigid python then you’re looking for PotionMeta
Read the docs. It tells you exactly what to use
but then theres conditions too, e.g. a cake works if you're not hungry and are not in creative
Mixins would be handy now certainly
Send me the exact page
you could also lookup this https://github.com/Arnuh/ArmorEquipEvent
cannot access org.bukkit.command.Command is this uh normal
How do I hide the ability for players ingame to see / commands?
yea that one also doesnt cover that
so if you right click a cake and you are hungry it doesn't fire the interaction event or what?
if minecraft doesn't do it, do it by yourself
Can you send me the page please?
Anyway Conclure already told you what to use
Lol you funny bro
The docs he sent me doesn't have the answer, I need to apply potion on itemstack, not entity and not livingentity
My guy read please
turns out I needed java 16
dude the reason why it is deprecated is written there
Do you really think I would ask questions here if I already did and didn't find any solution? please man if you not willing to help just don't reply me please
Thank you
the deprecation note will normally give you hints on what you can use in replacement
Usually it does but in this case I struggled a bit
Awesome! Tyvm
Why since the update I get java.lang.IllegalStateException: zip file closed error? anyone know what can cause this?
malformed zip?
I built it like I usually did

I tried to create new project, and moved the files and built everything start over, still zip closed issue
And I saw on paperMC discord server that a lot of people having this issue lately
maybe you wanna show us the full error?
maybe you wanna go to paper
^
whats on line 265
I know to read error traces, there's nothing wrong with the project's code for sure
I changed nothing, since the update it's started to be a thing in most of my resources
Guys how to send player to another server and don't tell me Bungee Messaging Method , because I don't understand IT
you'll have to
@hybrid spoke okay. But how to understand it ?!
**How to understand it **
wasnt there a command for PMC
?cc list
Meow
?mywarnings
How to understand
?cba
fatpigsarefat#5252 definitely regrets to for the most part inform you that unfortunately, they essentially are unable to definitely assist with definitely your enquiry, which essentially is fairly significant. Please simply really ask again later or possibly kind of ask someone else about this enquiry, demonstrating that the person that ran this command generally regrets to kind of inform you that unfortunately, they for the most part are unable to generally assist with actually your enquiry in a subtle way. Thank you very sort of much for kind of your time and the person that ran this command specifically wishes you a really good day, so the person that ran this command really regrets to actually inform you that unfortunately, they literally are unable to definitely assist with very your enquiry, or so they particularly thought.
What you mean update my code?
doesn't look like it
if there was an update and now your code crashes, you have to update your code
:/
The home of Spigot a high performance, no lag customized CraftBukkit Minecraft server API, and BungeeCord, the cloud server proxy.
Why homeless are homeless? just buy a house...
i am not kidding
Not but for real, I need to change nothing, something wrong
What you mean update my code? the startup methods still the same so it's not matter
Not your code
This is an error with the server
This is another instance of the Classloader saying "fuck you" and where you basically wasted your time
Make sense 😄
What is your solution mate
Alright thank you for the quick solution
no problemo
?cba
Paradis#4432 definitely regrets to for the most part inform you that unfortunately, they essentially are unable to definitely assist with definitely your enquiry, which essentially is fairly significant. Please simply really ask again later or possibly kind of ask someone else about this enquiry, demonstrating that the person that ran this command generally regrets to kind of inform you that unfortunately, they for the most part are unable to generally assist with actually your enquiry in a subtle way. Thank you very sort of much for kind of your time and the person that ran this command specifically wishes you a really good day, so the person that ran this command really regrets to actually inform you that unfortunately, they literally are unable to definitely assist with very your enquiry, or so they particularly thought.
Hey, does anyone know how I can create my own biomes grid and then change blocks and terrain for each biome?
i believe theres an event for when new chunks load
theres plugins that take that and add schematics for example
you should make a void world for that
yes
i think you have to add a plugin
that adds void to mv
i dont wanna be rude cuz i woke up in a good mood today, but that was the first link
i googled "multiverse core void world"
try tha
https://drive.google.com/file/d/1fPG48Mt8sb7CQMgq37eJj9hIH65iCsaU/view?usp=sharing
How do I make the wither on like player's Y level?
show current code
yup, but I doubt it will help me determine the shape of the biome
How do I include a library.jar in my plugin without using maven? I'm using Eclipse and not really sure what to do. Trying to import BookAPI...
still not totally sure how listeners work. if i create a new method and name it whatever i want (say, for pedagogical purposes, onButtFart) and then pass an argument (say, final InventoryCloseEvent event) will any occurrence of said InventoryCloseEvent call this method?
Then just export it as a runnable jar file & tick "include the libraries"
I found the reason for the closed zip file issue when the system trying to access other class rather than the main class it's printing this error
There's nothing wrong with the classes by the way I checked that
[17:58:54 WARN]: java.lang.IllegalStateException: zip file closed
[17:58:54 WARN]: at java.base/java.util.zip.ZipFile.ensureOpen(ZipFile.java:828)
[17:58:54 WARN]: at java.base/java.util.zip.ZipFile.getEntry(ZipFile.java:327)
[17:58:54 WARN]: at java.base/java.util.jar.JarFile.getEntry(JarFile.java:514)
[17:58:54 WARN]: at java.base/java.util.jar.JarFile.getJarEntry(JarFile.java:469)
[17:58:54 WARN]: at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:167)
[17:58:54 WARN]: at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:586)
[17:58:54 WARN]: at org.bukkit.plugin.java.PluginClassLoader.loadClass0(PluginClassLoader.java:119)
[17:58:54 WARN]: at org.bukkit.plugin.java.PluginClassLoader.loadClass(PluginClassLoader.java:114)
[17:58:54 WARN]: at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:519)
The issue can be maybe on Eclipse IDE?
only if the method is marked with @EventHandler annotation
actually no, does it even matter
i have that but idk if it does
no, this is a classloader issue; nothing you can fix on your end. You will need to report it to the developers of this classloader (so whatever your server software comes from)
That is unless you closed the zip file manually, but I highly doubt that
You can name the method whatever you want, as long as you have the @EventHandler annotation, the method will got called when the event is being fired.
cool ok
and as long as it is loaded by the correct classloader
wdym
Quick question, why is there no spigot api wrappers? Can’t you just compile to Java from an api wrapper then compile to bytecode
You make a wrapper for the api calls then you make a program which formats it to Java so no bottleneck
how would that solve a bottleneck
Because currently ((unless I misunderstood)) current wrappers are impractical for “”reasons””
Presumably weird jvm stuff
what's the point
Aren’t most? And the ones that may arrive in the future
I mean - i often see people trying to use this shitty python wrapper which has a few things you can do, but doesn't fully expose the api
If stuff is just events and it’s just 1 api you can probably do templates with logic in between
I wanna do stuff in Nim then compile to JS then compile to Java but the api Doesn’t exist obviously
I always thought annotations don't last past compile-time, seems like I am wrong
somehow Method has annotation getters
it depends on the annotation
some can be included in the compilation to be read at runtime
ahh ok
is there a plugin that replaces blocks when they are broken?
There is one if you code your own.
does barstyle.SOLID means a filled bossbar?
I tried checking all the options I could a few different ways and still no dice...
I am getting this error: https://hastebin.de/jimadujotu.sql, but when I extract the jar using winrar. I see this....
why is there basicalyl everything in that jar
also those have different names
plugins/BloodyPlugin-0.0.1-SNAPSHOT.jar BloodyServerPlugin - Copy.zip
I renamed it in export. That is the issue tho. In order for it to get the name it has to look in plugin.yml???????
well no that's just the file name
nvm. had a 2nd version of the file in my plugins folder. shut up I am "very" smart
How come I can only access my singleton class when I call it and the methods under a @Override or @EventHandler
huh?
Ive got this class public class a { public static PlayerGroups caller = new PlayerGroups(); }
and I use it so I can access that instance from other packages to only use that group
ok
But I can only access its methods when its inside @Override or @EventHandler ```public class PlayerLeaveListener implements Listener {
@EventHandler
public void onPlayerLeave(PlayerQuitEvent e) {
System.out.println(a.caller.getPosition(1));
System.out.println(a.caller.getPosition(2));
Player player = e.getPlayer();
if (player == a.caller.getPosition(1)) {
a.caller.clearPosition(1);
a.caller.sortGroup();
} else if (player == a.caller.getPosition(2)) {
a.caller.clearPosition(2);
}
}
}
are you importing it into the other classes
yes
events need @ EventHandler
what happens when you access it not inside an override or eventhandler
yes
have you tried just calling one anyway
don't they need to be static
so.. it works then?
send the PlayerGroups class
?paste
Hello can someone helpme in this?
i made leaderboard with pages but it doesnt split the players
like i do
10 players per page
and i have 20 players
it say have 2 pages but in both of them it show 20 players
code:
https://haste-bin.xyz/yuzolefahi.java
what happens if you call a method and try to compile it
I cant really help with the IDE problems but cant this whole class be replaced with an array?
With some convenience methods ofc
Also that class isnt a singleton
at no point do you actually break the for loop which displays the players
A singleton manages one instance of itself and uses static accessors to modify said instance
So only 1 instance exists at all times
i dont think you are counting how many display there is at any time
you shoudl also consider having uuid in PVP_stats a foreign key to names so you can perform a join on the database rather than sending a ton of queries
everything can be a singleton if you try hard enough
ok
what do the @Override and @fresh templetHandler do exactly? Like whats the term for them
rip even
override tells the compiler it is overriding a method, eventhandler is used by spigot to register your methods where youo listen to events
Well eventhandler does
Not override
Zlaio i dont think the annotations are your problem
poor even, hes a victim of his own nickname
yeah ik
i just wanted to know
but its weird cause i can call them inside that annotation
Asking about your attempted solution rather than your actual problem
is there any way to go back in a blockiterator
no
Does anyone know when I print out e.getClick() and I right click, nothing shows up. But when I left click, it says "LEFT" (InventoryClickEvent)
are you holding anything
*In InventoryClickIvent
Yes
Hello guys, i'm diving into configuration serialization/deserialization... but when i try to get the set it gives me a null value, here my code: ```java
@Override public void onLoad() {
ConfigurationSerialization.registerClass(Database.class, "DatabaseConfig");
saveDefaultConfig();
}
@Override public void onEnable() {
Database db = getConfig().getObject("database", Database.class);
getLogger().severe(db.getHostname());
}
what's wrong?
Does it implement Serializable
yeah
is there a way to check the next item in a BlockIterator without going to the next one
Question, why are you doing that on load?
hasNext?
i thought it was the best way...
Do it onEnable
hm ok i'll try and let you know
?paste your Database.class
Hello
Hi
Can anyone fix this code
on join:
open virtual chest inventory with size 4 named "&bWorlds" to player
set {_i} to 10
loop all worlds:
format gui slot {_i} of player with grass block named "&e%loop-value%" with lore "&7Click to teleport" to run function tpToWorld(player, loop-value)
add 1 to {_i}
function tpToWorld(p: player, world: world):
if {_world} is a world:
teleport {_p} to world {_world}
message "&aSuccessfully teleported you." to {_p}
stop
else:
message "&cError whilst receiving world info. Contact staff." to {_p}
not the problem...
i'll do ^^
this is not the skript discord...
And you cannot just say "fix code"
Oh sorry
bye
Correct me if I'm wrong, but does it not have to implement java.io.Serializable too?
no
Alright
database looks fine
@odd tapir deserialize is static
Wait
My bad
Read the docs
@odd tapir
Did you do that
.
.
oh you already sent it
What’s the reason for setting the alias?
You could try putting it in a static block idk
Do you have the class saved to your config?
||```yml
database:
type: 'mysql'
username: 'root'
password: 'root'
hostname: 'localhost'
port: '3306'
name: 'database'
Thats not serialized, thats just an entry
oh
getConfig.set("database", new Database())
^
then save, and you will see what it should look like
ok
it "just" have the ==: with the alias
so i think that's the error
i didn't implemented it
No thats how the serialization works
You dont need to use that value
Same thing when you save a Location to a config too
I am using external libraries, but don't want to shade bukkit into my plugin for file size. Why isn't this working? (I am very new to this, so sorry if it is just me being an idiot)
Part of my pom.xml that is the issue:
<build> <plugins> <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> <artifactSet> <excludes> <exclude>org.spigotmc:spigot-api:1.17-R0.1-SNAPSHOT</exclude> </excludes> </artifactSet> </configuration> </execution> </executions> </plugin> </plugins> </build>
k thank you!
Can anyone link me to the skript discord server
just add <scope>provided</scope> to your dependency
the spigot api one?
yes
so the fawe developers dont seem very nice and refuse to fix this big issue "because the plugin is open sourced" and said issue is causing major issues on my server. the issue in question is the "disallowed-blocks" config option. it just doesnt work at all. one of the devs said this (paraphrasing): "if the option doesnt work, then no, there isnt a way to blacklist blocks" like... its your plugin, maybe you should fix it.. since they refuse to fix it, im hoping someone from here can give it a shot ;shrug:
Spigot 1.17 is not optimized yet, I occupy 16 plugins, with 56 ram and 8 cores, and the tps go down
probably just burned out maintainers at this point
its causing the server to crash if someone decides to lag the server with a ton of blacklisted blocks and its getting really annoying at this point. we use plotsquared so we cant switch to regular w/e unfortunately
By looking in their discord they never said they wouldn't add it. They just said it wasn't a priority because they have a lot of other things to fix
thats why i came here, because they wont fix it
They will fix it when they have time
If you need it faster hire someone or do it yourself
looking at the code i don't spot anything wrong with it at first glance
i asked here to see if someone could do it for us because i cant do it myself :/
github my beloved
if they arent gonna address it when someone directly asks i dont see why theyre gonna listen to a github issue..
i am more likely to address something if it's a github issue rather than if it's a question in my discord server
discord is not an issue tracker
github is
fair enough ig
in fact i tend to just ignore people who suggest things through discord, since i am 99% likely to forget about it anyway
i have specific templates set up with the github issue tracker so i get the right information, and i make it very clear to use that to report bugs & suggestions to, rather than just dropping a line in discord
jebaited
also where most open source projects are
update.. my co-owner doesnt have a brain and was testing the filter while he was opped... sigh
lol
I think that galaxy background causes it 😉
so im having issues similar to this <#help-development message>
says the same, Cannot resolve method 'scheduleSyncDelayedTask' but im calling it like this ```java
public class TradeCommand implements CommandExecutor {
private final TradeSimulator tradeSimulator;
public TradeCommand(TradeSimulator tradeSimulator) {
this.tradeSimulator = tradeSimulator
}
}
// and setting it like this in my main class
this.getComand("trade").setExecutor(new TradeCommand(this));
// within TradeCommand, I'm trying to use the var like this
Bukkit.getScheduler().scheduleSyncDelayedTask(tradeSimulator, new Runnable() {
@Override
public void run() {
// do stuff
}
}, 20, 20);```
bro everyone do be hating on it idk what's so bad
you can't cast the boxed versions, you must unbox them first (cast to double/long)
there are only 3 arguments for scheduleSyncDelayedTask
when is it gonna be able to convert Double to Integer
now thats an ultra brain moment tx
yes you are?
there is an implicit cast when you make the comparison
yes
System.currentTimeMillis is a long, so map.get(s) will need to also be converted to a long
assuming that the map stores Double, then yeah
wait you cant?
im pretty sure you can compare a Integer to a int or Long to long
because it's unboxed when its compared
the issue is when they're different boxed types
whats candyapi?
because then technically they're objects then, and different
it says the error is in there
CooldownBasePlayer line 21?
can you please put it in a paste
?paste
what should i use to move data between local plugins? is it possible to broadcast data internally?
like an economy plugin
hmm yeah weird sys idk whats wrong
return config.getLong("kitsUsed." + id + "." + kitID);
}
//if data > 0 kit is on cooldown return true
public boolean kitIsOnCooldown(int kitID) {
return ((getWhenKitIdWasUsed(kitID) / 1000) +
(kits.getKitCooldown(kitID)) -
(System.currentTimeMillis() / 1000) > 0);
}```
for cooldown you can use that
ah sorry
wait sys you know the start cooldown method where you have a arg with int cooldown maybe change it to long cooldown
same error?
idk wtf you got that error because your legit not casting Double to Integer
im thinking its this bit System.currentTimeMillis() < map().get(s)
maybe the < is casting map().get(s) to Integer?
idk why it would tho
have you tried souting the map.get to see what it really is
should be long but might as well see
i say just fuck it and cast it to Number and .longValue()
can't see whats wrong with ti
don't see the point of holding Dates if all you care about is the numeric representation of it
well like i said you can cast it to Number and just get the long value
the boxed primitives extend Number so that should be safe
map().get(s).longValue()
uh how do I color clay blocks? its being fussy and not accepting theBlock.setData((byte) 1)
dunno what version ur on but modern mc versions dont have a concept of data codes anymore
each colour has a seperate material
1.17.1 but im trying to use legacy_stained_clay
why
why
because I need to view it colored on 1.8 lol
that won't work on 1.8
but it did doe
if you put that on a spigot server running 1.8, it wont
oh no, I meant the server is 1.17.1, the client is 1.8
LEGACY_STAINED_CLAY did not exist then
so why wouldn't using the named colour materials work
Bruhh
does viaversion not translate it or something
dont think it exists anymore
should I try concrete
diauwjdiuaj
and I mean GREY_STaINED_CLaY for instance doesnt seem to exist
or gray
ill try concrete 🤔
isn't it called terracotta or somethign like that
oh right I always mix them up
wrong java version
oh, is there a protocollib that is more updated?
no you're running java 8
so I need to upgrade my java?
yes
is it java se development kit?
hey there just a quick question but how would i go about giving a random string name to a json array
for example: JSONArray randomName = new JSONArray(); and then the randomName would be a randomly generated string
why are you using a JSONArray for a string?
isnt there like JsonString?
is there an event of player setting a respawn loaction?
did you update the path in env variables
added it to your intellij and select it?
oh that's probably it
You have built with JDK 16 but you are running JRE 8
lol you add it in the sdk sections in the settings
and you select it in the project settings
pretty sure
no im pretty sure he has it the other way round
it says the class file is 60 but expected 52. So it was built with java 16
oh i thought it said it expected 60 but was 52
xd
@eternal oxide wait but didnt he say hes running 1.17.1 spigot how is he running it on java 8? or was that someone else
if u notice
it's a nms class which is compiled as java 16
and is what is causing the error
how come all the spigot stuff is spelt in american english 
Does getBedSpawnLocation() includes anchor???
read the docs it should say
well i dont see any other method for setting anchor spawn location, and the docs are vague, so maybe
but then it wouldnt make sense if there was both a bed and anchor spawn, so probably not
Gets the Location where the player will spawn at their bed, null if they have not slept in one or their current bed spawn is invalid. it says
isnt the anchor for all players
no its per player
it is?
probably
it is
well actually that method might since the player can only have one respawn location set
precisely what i am doing now
and if it doesnt then its up to you to choose to use nms or something
because it has now piqued my interest
nms might have a way to get/set it idk
can confirm it in fact does
set spawn location to respawn anchor then relogged
PlayerJoinEvent: Bukkit.broadcastMessage(event.getPlayer().getBedSpawnLocation().toString());
-> [20:17:06] [Server thread/INFO]: Location{world=CraftWorld{name=world_nether},x=-17.5,y=71.0,z=25.5,pitch=0.0,yaw=0.0}```
i guess that makes sense if they just set the bed spawn they wouldnt have to change alot of the code
and thats probs also why when you use a respawn anchor in the end you cant go back to the overworld
without using cheats
or deactivating it
im pretty sure i did that and it didnt work
you can?
i did it before...
i think maybe they made it so you cant in 1.17
but it was in 1.16 working (pretty sure)
atleast i think (respawn anchors are in 1.16 right?)
try in 1.16
cuz when i did it i was in 1.16 or 1.15 (not sure)
and 1.17 wasnt out then
how about u try it out
cant
why
is there any way of checking if an op has a permission, without hasPermission returning always true?
im pretty sure if you have a permission plugin if a player has op and you remove a permission from that player pretty sure hasPermission doesnt return true on that permission
it does
prove it
eww
?
LuckPerms 😌
noice
why are you rightclicking?
to use it?
pretty sure you dont have to ?
i dont remember doing that
to set respawn point?
it was literally the only one that worked when i started the server about 4 years ago, for some reason the rest didnt work, i tried all of them, and i have no plans of changing it now
have you even played the fucking game
lmao
yes
i just havent used respawn anchors in a while
GM is a great plugin 😉
u can make a plugin that the respawn anchor doesnt explode and set ur respawn point
pff
i think when i tried it was either a 1.16 snapshot or 1.16 not 1.16.x
what is this, a minecraft or a javascript community
how could that change in 1 year
well anyways, no way of knowing the real permissions of an op player?
nah we hated it for like more than 3 years ago (idk)
but it was last updated a year ago
anyway no one likes groupmanager
its yucky
thats rude
it would be documented here if such a removal was made#
so u might be chatting shit or smth
nah i legit ran it in the end before
GM had its last update 23rd of May this year
no it didnt
on the spigot page
it was last year of update
Yes it did. I'm the dev for it 🙂
anyway gm sucks
he is literally the guy who made it lol
i remember it taking like a solid week for me to figure out how to use groupmanager back in the day
but I was like 13
ok make it better
and then i stop hating it
a year ago I did a LOT of updates.
then pex was the next thing that all the cool kids used and now its luckperms
pex died
pex was bad
aren't they remaking it
we dont even know if pex 2.0 was coming out
wasnt it like announced it was happening a year ago
why is intellij replacing this
if (!(sender instanceof Player)) return false;
Player player = (Player)sender;
with this
if (!(sender instanceof Player player)) return false;
new java feature
does instanceof cast sender into a Player or what
its java 16 auto cast
don't need the second line anymore to make it slightly more cleaner
thats probs only thing i actually might like of java 16
lol trent(minehut admin also a dev of essx) is in the pex(its more just than pex tho) discord
show your dependencies
you're importing spigot not spigot-api
if you're not aware
i need spigot
then run buildtools for those versions
spigot api is succesfully imported
the spigot repo doesnt contain the spigot jars im pretty sure
I just took it from here :/ https://www.spigotmc.org/wiki/spigot-gradle/
The home of Spigot a high performance, no lag customized CraftBukkit Minecraft server API, and BungeeCord, the cloud server proxy.
are you sure you need spigot and not spigot-api
i need both
okay, then i need spigot
why do you need to use nms ?
then make sure you have run buildtools for the version you want
it will be installed to maven local
what im wondering rn is why you need access to nms
something that cannot be done through the api for sure 🤔
only thing that comes to mind is hiding entities or using packets
but then you could just use protocollib
Player player = (Player) sender;
if (args.length >= 1)
sender.sendMessage(ChatColor.RED + "bro you're so cringe lmao");
else {
Player target = Bukkit.getPlayerExact(args[0]);
if(target instanceof Player) {
ScoreboardManager manager = Bukkit.getScoreboardManager();
Scoreboard board = manager.getNewScoreboard();
Objective obj = board.registerNewObjective("test", "dummy","§cEwen_Is_Fat_XD§r" );
obj.setDisplaySlot(DisplaySlot.BELOW_NAME);
obj.setDisplayName("§cEwen_Is_Fat_XD§r");
player.setScoreboard(board);
player.setPlayerListName("§cEwen_Is_Fat_XD§r");
player.setDisplayName("§cEwen_Is_Fat_XD§r");
player.setCustomName("§cEwen_Is_Fat_XD§r");
}
else {
sender.sendMessage(ChatColor.RED + "who tf is that?");
}
would the scoreboard under my name work because i can't really confirm it myself
why cant you confirm it yourself?
explain how
get someone else on to tell you or get a alt??
brhioaljsdkpaodjas
back again with the ewen abuse
i have a really slow hard drive
yes me too
so it takes so long to open minecraft
the fucking bar saying its starting sometimes even rewinds
LIKe wtf
shouldnt it stay at where it is
not fucking rewind
i cant even open minecraft
then how are you testing your code works
if my server can handle it
f
is anyone here experience with scoreboard?
Hey guys, I've been getting into spigot and bungee developement for a few weeks now, and I've really been struggling to figure out how to communicate between the spigot plugin and the bungee plugin. Specifically I'm trying to make the bungee plugin send a plugin message to the spigot plugin which will then do something.... I've tried a bunch of different stuff and it hasn't worked, so would anyone have any advice or examples of how this could be achieved? Thanks :)
The home of Spigot a high performance, no lag customized CraftBukkit Minecraft server API, and BungeeCord, the cloud server proxy.
As far as I can tell that is spigot to bungee, but would that also work to send from bungee to spigot?
Myeah
ignored.
You need to register an incoming channel with a plugin message listener in your spigot plugin then iirc register the outcoming channel in bungee
i dont know thats why i ignored you
bruh ok
Can somebody help me in understand how to remap 1.16 import net.minecraft.server.v1_16_R3.Entity; for 1.17?
Me iz confuzed.
Presumably without the nms version
if changing a thing that your ide might suggest changing to so hard then dont use nms at all
s
What I have currently in the onEnable methods are:
Bungee:
getProxy().registerChannel("bungee:channel");
Spigot:
getServer().getMessenger().registerIncomingPluginChannel(this, "bungee:channel", this);
Would that be the correct way to register the channels?
Eclipse isn't suggesting a replacement for me. Looking for some help 😁
¯_(ツ)_/¯
i dont know nms doesnt have a 1000 page document on how to use it
cuz it isnt a api
@hushed garnet what is the 1.17 issue
w h a t
tf
??
I was using this to track entities for hologram text on item drop, Entity nativeEntity
Looks right, lmk if you encounter some issues Ig
wtf is happening
i posted 1.17.1 leaks in chat today rn (even tho its released now)
wtf
???
wtf????
why are you saying "wtf" tho?
i am so confused
i didnt mean legit now
k
alr now your confusing me
i said its released now as its been released i dont mean actually rn
So for some reason it's still not working....
This is the code to send the pluginMessage from bungeecord:
Collection<ProxiedPlayer> networkPlayers = ProxyServer.getInstance().getPlayers();
if ( networkPlayers == null || networkPlayers.isEmpty() ) return;
ByteArrayDataOutput out = ByteStreams.newDataOutput();
out.writeUTF( "SubChannel" );
out.writeUTF(data);
player.getServer().getInfo().sendData( "bungee:channel", out.toByteArray() );
}```
This is the spigot main class to receive it:
```public class Main extends JavaPlugin implements PluginMessageListener {
@Override
public void onEnable()
{
getServer().getMessenger().registerIncomingPluginChannel(this, "my:channel", this);
}
@Override
public void onPluginMessageReceived(String channel, Player player, byte[] bytes){
if (!channel.equalsIgnoreCase("my:channel")) return;
ByteArrayDataInput in = ByteStreams.newDataInput(bytes);
String subChannel = in.readUTF();
if (subChannel.equalsIgnoreCase("SubChannel")) {
String data = in.readUTF();
Bukkit.broadcastMessage(data);
}
}
}```
holly fuck
put that in a paste
that is the point
is this just texture or is it actually something different about the two?
because if its just texture why did mojang just not add customModelData to blocks and use that??
hey there so right now im trying to run this code to save the players cords to a JSON file. the int i is just there to be temportary but for some reason it is not working i am getting no stack trace or anything
https://pastebin.com/gaJ7csfj
?paste
Different channels
its based on deepslate, so yes theres a difference
CommandGeek bungee:channel isn’t the same as my:channel 
@granite stirrup ^^
now its in a pastebin :)
whats not working?
Lecterns holding a book emit a full-strength redstone pulse that is one game tick long (0.5 redstone ticks) when a page is turned
Hi, is it possible to assign custom properties on a player object?
but doesnt mean it should be apart of redstone?
Yes, use PDC
1.14+ pdc
?pdc
idfk, guess they just felt like putting it there
So it wouldn't work on 1.12.2?
it does not want to write to my json file. i want to create a new json object for every new time a checkpoint is registred
my server is 1.12.2 only
that's not the solution
why are you even using 1.12 still?
Is there any way to cancel console messages when a named entity kills someone or dies ?
Alright then you will have to store the information on your own
not sure whats wrong cuz i never used jsonobject before
np then
can you even edit the playerdata that gets saved?
is a hashmap with uuids a good idea?
Yeah that will have to do
that isnt gonna be persistent though
so you will have to save it some where if you do want it persistent
Hence why you store it yourself in a persistent file
just noticed that haha
fixed it, but still nothing seems to happen.... but I'm not sure if it's a problem with the sending or receiving...
just please dont save to the file every time maybe just make it when someone quits the game or server stops
I don't need it to be persistent. I'm doing a quick fix for an exploit, involving players moving millions of blocks in a few seconds. I'm just gonna save player's locations and check it every half a minute
but is it good from a performance perspective?
you probs will be fine
ok, thanks alot guys
Do you have bungeecord set to true in spigot.yml?
Or like the bungee option, I believe that might be needed also
yep I do, the servers are working just fine, and the spigot plugin and the bungee plugin are working perfectly, except for the communication between them