[SPIGOT-5701] world.setstorm() does not work Created: 27/Apr/20 Updated: 28/Apr/20 Resolved: 28/Apr/20 |
|
Status: | Resolved |
Project: | Spigot |
Component/s: | None |
Affects Version/s: | None |
Fix Version/s: | None |
Type: | Bug | Priority: | Minor |
Reporter: | Jesus Torres Egido | Assignee: | Unassigned |
Resolution: | Done | Votes: | 0 |
Labels: | Spigot, bug, error | ||
Environment: |
Windows 10, JAVA EDITION. GTX 960M i7-6700HQ. Latest spigot server jar, clean install of server. |
Version: | 1.15.2(latest) |
Guidelines Read: | Yes |
Description |
I'm developing a new plugin, and i need to set storm in the world. But the function // marcador de posición de código public class main1 extends JavaPlugin{ @Override public void onEnable(){ System.out.println("cargao correctamente"); } @Override public void onDisable(){ System.out.println("descargao correctly"); } @Override public boolean onCommand(CommandSender sender, Command command, String label, String[] args) { if (command.getName().equalsIgnoreCase("llueve")) { World mundo = sender.getServer().getWorld("world"); mundo.setStorm(true); mundo.setWeatherDuration(15*20); sender.sendMessage("llueve por 15 minutes"); } return false; } }
This is the code that plugin executes...., the name of the world is world.... by default... but setStorm seems doesnt work....
|
Comments |
Comment by Black Hole [ 28/Apr/20 ] |
If you won't to run a vanilla command like "weather" interdependent if another plugin is registering a command with that name, use "minecraft:weather". The vanilla command is setting durations for weather und thunderstorm first, then switch to rain and then activates the thunderstorm. |
Comment by Jesus Torres Egido [ 28/Apr/20 ] |
i had java 32 bit and my system is 64bit.... i installed 64 bit and now it works perfetly |
Comment by Jesus Torres Egido [ 27/Apr/20 ] |
a demostration with other command and when it executes i send a message to sender in order to check if command works. but the function Bukkit.getWorld("world").setStorm(true); doesn't work, rain is not workin and the server is a clear installation |
Comment by Jesus Torres Egido [ 27/Apr/20 ] |
sorry for my english. Well if i use Bukkit.getWorld("world").setStorm(true); it doesnt work. I tried to check with Bukkit.getServer().dispatchCommand(Bukkit.getConsoleSender(),"weather thunder"); <- this dispatch command works if essentials is not installed. i know that the command weather thunder needs an integer for time. it is so weird, why the function setStorm doesnt work..... I made a clean server with the latest spigot and the maven dependency same....
no plugins in the folder only the plugin with the code above in ticket |
Comment by Black Hole [ 27/Apr/20 ] |
Please explain under which conditions it will work and what dispatch code you're using. Also don't run other plugins like Essentials while testing. (Maybe ask a friend to translate for you.) |
Comment by Jesus Torres Egido [ 27/Apr/20 ] |
if i use a dispatch command it works... but i dont want to use dispatch command to avoid issues with essentials to set storm.... |