Zrips / CMI

117 stars 99 forks source link

CMI.MODULES.SCHEDULER error #298

Closed tmellen closed 6 years ago

tmellen commented 6 years ago

Occasionally I get this in my console. The random schedule still runs every 5 minutes with one-line blurbs, and only noticed the error in the console.

####################
24.04 20:15:25 [Server] WARN java.lang.ClassCastException: java.util.LinkedHashMap cannot be cast to java.lang.String
24.04 20:15:25 [Server] WARN at com.Zrips.CMI.Modules.Sheduler.Schedule.getRandomCommand(Schedule.java:43)
24.04 20:15:25 [Server] WARN at com.Zrips.CMI.Modules.Sheduler.Schedule.perform(Schedule.java:198)
24.04 20:15:25 [Server] WARN at com.Zrips.CMI.Modules.Sheduler.Schedule.safePerform(Schedule.java:193)
24.04 20:15:25 [Server] WARN at com.Zrips.CMI.Modules.Sheduler.SchedulerManager.checkSchedulers(SchedulerManager.java:240)
24.04 20:15:25 [Server] WARN at com.Zrips.CMI.Modules.Sheduler.SchedulerManager.access$0(SchedulerManager.java:233)
24.04 20:15:25 [Server] WARN at com.Zrips.CMI.Modules.Sheduler.SchedulerManager$1.run(SchedulerManager.java:226)
24.04 20:15:25 [Server] WARN at org.bukkit.craftbukkit.v1_12_R1.scheduler.CraftTask.run(CraftTask.java:76)
24.04 20:15:25 [Server] WARN at org.bukkit.craftbukkit.v1_12_R1.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:353)
24.04 20:15:25 [Server] WARN at net.minecraft.server.v1_12_R1.MinecraftServer.D(MinecraftServer.java:739)
24.04 20:15:25 [Server] WARN at net.minecraft.server.v1_12_R1.DedicatedServer.D(DedicatedServer.java:406)
24.04 20:15:25 [Server] WARN at net.minecraft.server.v1_12_R1.MinecraftServer.C(MinecraftServer.java:679)
24.04 20:15:25 [Server] WARN at net.minecraft.server.v1_12_R1.MinecraftServer.run(MinecraftServer.java:577)
24.04 20:15:25 [Server] WARN at java.lang.Thread.run(Thread.java:748)

####################

CONFIG SECTION (IGNORE IF NOT RELEVANT):

Announcer:
  Enabled: true
  MinPlayers: 1
  Delay: 300
  Repeat: true
  Randomize: true
  Commands:
  - broadcast! &f[&6Info&f] If you missed the server welcome message, type &e/MOTD
  - broadcast! &f[&6Info&f] Rules can be found at &e/Rules
  - broadcast! &f[&6Info&f] If you need staff help, send them a msg with &e/HelpOp
  - broadcast! &f[&6Info&f] Need some help? Check out our &6How To&f Channel:&b https://discord.gg/ng6V8pB
  - broadcast! &f[&6Info&f] Join our Discord:&b https://discord.gg/XQxDJ27
  - broadcast! &f[&6Info&f] Need some TARDIS help?&b https://eccentricdevotion.github.io/TARDIS/site-map.html
  - broadcast! &f[&6Info&f] Don't forget -- you can open an enderchest anywhere by typing &e/ec open
  - broadcast! &f[&6Info&f] Helpful hint -- toggle PVP status on or off with &e/pvp
  - broadcast! &f[&6Info&f] Want to craft an item but no crafting table? Type &e/craft
  - broadcast! &f[&6Info&f] Read any good books lately? Type &e/help&f To see the new &lHelp Books!
  - broadcast! &f[&6Info&f] Need some quick gold!? &e/vote&f for the server. You get&6 500 gold&f per vote! 4 votes = 2000!
  - broadcast! &f[&6Info&f] Want to explore somewhere new? Type &e/rtp
  - broadcast! &f[&6Info&f] Check out the Auction House for player sold goods, or sell some yourself! Type &e/AH
  - broadcast! &f[&6Info&f] Got a shulker box? You can SHIFT-RIGHT-CLICK it in your inventory to open it!
  - broadcast! &f[&6Info&f] If you see a 'Boss Bar' appear with a monster name above it -- look out! Danger ahead!!!
  - broadcast! &f[&6Info&f] Quests are being added! Check out the Tavern outside of Spawn for a few starter ones!
  - broadcast! &f[&6Info&f] Please keep chat family friendly. We have players as young as seven here!
  - broadcast! &f[&6Info&f] Read any good books lately? Type &e/help&f To see the new &lHelp Books!
  - broadcast! &f[&6Info&f] Mobs can randomly carry powerful items! The more powerful the mob, the more powerful the item!
  - broadcast! &f[&6Info&f] Want to put some meat on your head? A banner? A glass cube? hold it in your hand and type &e/hat
  - broadcast! &f[&6Info&f] Type &e/Tags&f to give yourself a title! Earn more titles by killing mobs!
  - broadcast! &f[&6Info&f] Please keep the world beautiful! Don't litter, type &e/trash &fto throw away items you don't need.
  - broadcast! &f[&6Info&f] Signs, nicknames, even chat can be colorized! Type &e/colors&f to see which ones you can use!
  - broadcast! &f[&6Info&f] Hey man, let's party! Type &e/party&f to form a party of like minded adventurers!
  - broadcast! &f[&6Info&f] Put a sign on a door or chest to lock it for your use only! Type &e/help&f for more info!
  - broadcast! &f[&6Info&f] Claim an area of land with a golden shovel and make it your own! Type &e/help&f for more info!
  - broadcast! &f[&6Info&f] Lost your TARDIS? Head south out of &e/spawn&f to the parking lot to get it back!
  - broadcast! &f[&6Info&f] Want to climb rocks? Trees? Buildings?!? Look for the Shady Character and buy a Grappling Hook!
  - broadcast! &f[&6Info&f] Coming soon: Thieves Guild, Fighter's Guild, Mages Guild! Climb the ranks for prestige and power!
  - broadcast! &f[&6Info&f] Have any suggestions? Join our discord (&bhttps://discord.gg/XQxDJ27&f) and post them in the 'Suggestions' channel!
  - broadcast! &f[&6Info&f] Read any good books lately? Type &e/help&f To see the new &lHelp Books!
  - broadcast! &f[&6Info&f] Need some quick gold!? &e/vote&f for the server. You get&6 500 gold&f per vote! 4 votes = 2000!
  - broadcast! &f[&6Info&f] Carry a chest (or two) on you, and when you die they will be placed on the ground with all your inventory placed inside!

24.04 21:08:39 [Server] INFO CMI plugin version: 7.6.11.0 24.04 21:08:39 [Server] INFO Server version: Spigot 1.12.2-R0.1-SNAPSHOT 24.04 21:08:39 [Server] INFO Vault version: 1.6.1(CMIEInjector)

Zrips commented 6 years ago

malformed - broadcast! &f[&6Info&f] Coming soon: Thieves Guild, Fighter's Guild, Mages Guild! Climb the ranks for prestige and power! you can simply add " at start and and end of line to avoid this. But will make some work around to accept lines like this.