mirror of
				https://github.com/PlaceholderAPI/PlaceholderAPI
				synced 2025-10-31 06:12:28 +01:00 
			
		
		
		
	Initial attempt at preventing EzPlaceholderHook from working.
This commit is contained in:
		| @@ -154,7 +154,7 @@ public class PlaceholderAPIPlugin extends JavaPlugin { | |||||||
|       enableCloud(); |       enableCloud(); | ||||||
|     } |     } | ||||||
|     setupMetrics(); |     setupMetrics(); | ||||||
|     getServer().getScheduler().runTaskLater(this, this::checkHook, 20 * 30); |     getServer().getScheduler().runTaskLater(this, this::checkHook, 40); | ||||||
|   } |   } | ||||||
|  |  | ||||||
|   @Override |   @Override | ||||||
| @@ -193,8 +193,10 @@ public class PlaceholderAPIPlugin extends JavaPlugin { | |||||||
|       } catch (Exception ex) { |       } catch (Exception ex) { | ||||||
|         author = "the author of the hook's plugin"; |         author = "the author of the hook's plugin"; | ||||||
|       } |       } | ||||||
|       getLogger().warning(((EZPlaceholderHook) h).getPluginName() + " is currently using a deprecated method to hook into PlaceholderAPI. This will be disabled after the next update. " + |       getLogger().severe(((EZPlaceholderHook) h).getPluginName() + " is currently using a deprecated method to hook into PlaceholderAPI. Placeholders for that plugin no longer work. " + | ||||||
|               "Please consult {author} and urge them to update it ASAP.".replace("{author}", author)); |               "Please consult {author} and urge them to update it ASAP.".replace("{author}", author)); | ||||||
|  |       // disable the hook on startup | ||||||
|  |       PlaceholderAPI.unregisterPlaceholderHook(((EZPlaceholderHook) h).getPlaceholderName()); | ||||||
|     } |     } | ||||||
|     }); |     }); | ||||||
|   } |   } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user